[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: PEEK-CHAR-READ-CHAR-ECHO (Version 2)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: PEEK-CHAR-READ-CHAR-ECHO (Version 2)
- From: masinter.pa@Xerox.COM
- Date: 19 Sep 88 16:51 PDT
- Cc: CL-Cleanup@SAIL.STANFORD.EDU
- In-reply-to: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>'s message of Thu, 23 Jun 88 15:53 EDT
I at first doubted your Current Practice until I tried it myself -- it certainly
did differ among the implementations I tried.
Since as written there are no operating system interactions, I think this is
reasonable to put in the standard. I can't think of any important performance
issues.
I think you have picked on the two reasonable interpretations. I think
FIRST-READ-CHAR is preferable from the point of view of many applications.
Suppose a special version of READ is implemented in terms of READ-CHAR, and
further that its written
(case (setq first (read-char))
(#\( ... read list ...)
(#\# ... read dispatching macro ...)
.... other special cases ...
(otherwise (unread-char first) (read-symbol)))
where read-symbol is written in terms of read-char. It would be unfortunate to
have the first character of each symbol echoed twice, as I think would be
required by PEEK-CHAR-READ-CHAR-ECHO:READ-CHAR.