[MLton] Bug in LargeInt.scan
Wesley W. Terpstra
Mon, 15 Aug 2005 15:59:19 +0200
On Aug 15, 2005, at 3:22 PM, Henry Cejtin wrote:
> This last point was because I forgot the basis spec is so stupid on
> point. The notion of fromString handling an initial number and
> just pitching
> the rest is really wretched. C atoi() does that, but it is just
> plain wrong.
Why is it wrong?
For C's atoi it is not too bright, perhaps, but for SML where we have
these stream readers which return the point to continue scanning
from, it seems perfectly reasonable to parse '0xga' as 0...?