Parsing Numbers (was: Re: Exponents of numbers)
Andreas Raab
andreas.raab at gmx.de
Thu Sep 15 19:48:37 UTC 2005
(changing title to fit thrust of discussion better)
[e, q, d as exponents]
>> Why??? This seems completely superfluous and causes actual harm if
>> you happen to misspell a hex constant.
>
> Well, the obvious choice is e which still would be a hex digit. The
> Blue Book only has e, btw.
>
> I had a conversation with Dan once about Smalltalk's syntax for literal
> numbers and he was quite proud of the purely syntactical rules enabled
> by distinguishing upper and lower case.
That's not my point, which is: Why do we need "d" and "q" *in addition*
to "e"? Note that this is a recent addition - it has been added to 3.8
with update 6482NumberReadFromFixes-2-dtl which claims that
"These changes correct several problems with parsing of numbers from
strings and streams. The problems are demonstrated by NumberParsingTest
and ScaledDecimalTest (provided in separate change sets; the latter is
already included in the Squeak 3.9 image)."
Unfortunately, the only thing that relates to the behavior in question
are two tests which "confirm" that behavior. So again: Why "d" and "q"?
What do we need that for?
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|