[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Three really picky points



On Sun, Jan 15, 2012 at 7:04 PM, John Cowan <cowan@x> wrote:
> Vincent Manis scripsit:
>
>> It's obvious that string->number and read should use the same
>> conversion routine;
>
> That's what I thought too.  But Chibi uses two different routines, because
> `read` terminates on the first delimiter, whereas string->number returns
> #f if not all of the string is a number.  Still, that doesn't mean they
> should not be consistent.

Chibi's string->number is currently a wrapper around read,
unless you specify a non-decimal base in which case it
shortcuts to the internal sexp_read_number used by read.

It wouldn't be possible to specify read and string->number
are the same for non-decimal base arguments to string->number,
because read doesn't have this argument.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports