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

Re: (tyi foo) vs. (funcall foo ':tyi)

You're wrong about this.  The TYI operation is intended to be the
basic, fundamental operation of reading from a stream that can provide
input.  Echoing, which you may take for granted, is a higher-level
function, implying a bidirectional stream over which interaction is
being performed.  Very few streams are like this.  Any stream that IS
like this should also have echoing with rubout processing working for
READ and READLINE too anyway, or users will not be provided with these
useful functions.  Therefore, echoing and rubout processing both work
the same way and are used in the same places, and so the rubout
processing message is used in cases where echoing is desired.  The
reason TYI doesn't just do a :TYI operation is for MacLisp
compatibility; (TYI) must echo.  If you want a stream to echo, give it
a rubout processor operation; if you want to read characters and have
echoing happen if and only if the stream is interactive, use the TYO
function instead of the :TYI operation.