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

Re: Issue: PEEK-CHAR-READ-CHAR-ECHO (Version 2)



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.