[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A memorial day issue
- To: common-lisp%su-ai@USC-ECL
- Subject: A memorial day issue
- From: Bernard S. Greenberg <BSG%SCRC-TENEX@MIT-MC>
- Date: Tue, 31 May 1983 12:43:00 -0000
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.