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

A memorial day issue



Although the current PARSE-NUMBER is unworkable, the original idea has
a legitimate place, and satisfies a legitimate need, in the language.
Before coming to the Lisp Machine (which has a PARSE-NUMBER which is
really PARSE-INTEGER), every program that interacted with a user
which I had written required writing such a routine.  It seems inevitable
that any program that reads strings from a user would require such a 
routine, so, thus, it ought be part of the language.

READ will not do the trick.  READ cannot implement a subsystem's
contract on what the subsystem's legal input is.   Syntactic errors
in typing a number should be detectable in a portable fashion without
recourse to trapping READ errors (e.g., unbalanced parens in read-from-string).
READ can be forced to produce odd side-effects via #. .

Rename and respecify PARSE-NUMBER to PARSE-INTEGER.
-------