[MLton] Bug in LargeInt.scan

Henry Cejtin henry.cejtin@sbcglobal.net
Mon, 15 Aug 2005 09:11:09 -0500


I really (religiously) feel that this is completely wrong.  "0xga" is NOT an
integer.  If you want to know if something starts with an integer then use
a reader.  For Int.fromString, I want to know if I gave it an integer.
It is just too easy for programs to get lazy and mis-interpret results.
I could see quibbling about leading whitespace and perhaps even trailing
whitespace, but I would way prefer those being disallowed as well.
(Mind you, the whole standard basis library notion that negative numbers
can be indicated by ~ is also completely NUTS.  I know that this is done in
ML, and with good reason, but that is NOT what is used in text and so should
not be accepted by Int.fromString.)

Any way, this really is a religious conviction for me.