[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: STANDARD-INPUT-INITIAL-BINDING (version 1)
- To: pierson@MULTIMAX.ARPA
- Subject: Issue: STANDARD-INPUT-INITIAL-BINDING (version 1)
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 8 Feb 88 13:30 EST
- Cc: CL-Cleanup@SAIL.Stanford.EDU, KMP@STONY-BROOK.SCRC.Symbolics.COM, franz!smh@BERKELEY.EDU
- In-reply-to: <8801192339.AA20676@mist.UUCP>
I can't support this proposal.
I believe that the correct fix is for wording to be added that explains
that *TERMINAL-IO* might be a bidirectional stream which directs input
from and to a virtual and not necessarily a physical terminal. As such,
*TERMINAL-IO* should properly be initialized to
(MAKE-TWO-WAY-STREAM SYSTEM-INTERNALS:*UNIX-STANDARD-INPUT*
SYSTEM-INTERNALS:*UNIX-STANDARD-OUTPUT*)
If it were, then *STANDARD-INPUT* and *STANDARD-OUTPUT* would behave
correctly with no relaxation of the requirements on their initial values.
I think it is important that *STANDARD-INPUT*, *STANDARD-OUTPUT*, etc.
be defined to be bound to synonym streams initially. Here are some reasons:
* It may be important to the programmer to recover the value of this
virtual terminal. There is already a restriction on binding
*TERMINAL-IO* in Common Lisp, so the virtual terminal will always
be accessible from *TERMINAL-IO*. If the virtual terminal were in
*STANDARD-INPUT* and *STANDARD-OUTPUT*, the user might bind himself
into a corner where he could no longer recover the value of the
virtual terminal.
* I think the initial I/O pairing should be available as a unit rather
than in two different places.
* If there is no physical console, the value of *TERMINAL-IO* will
have garbage. There is no reason that input/output from/to programs to
*TERMINAL-IO* should fail just because an alternate input or output
stream was provided. You cannot make *TERMINAL-IO* indirect via synonym
stream to *STANDARD-INPUT*,etc. without risking complete disaster.
If it did, the user might do:
(LET ((*STANDARD-INPUT* (MAKE-SYNONYM-STREAM '*TERMINAL-IO*))) ...)
and get a circular synonym stream. In order to make sure that programs
can portably use synonym streams at all, it is extremely important that
the directionality of synonym streams be well-defined (ie, from
*STANDARD-INPUT* to *TERMINAL-IO* and not vice versa) and that there be
a known bottoming out point, *TERMINAL-IO*, which cannot be a synonym
stream to anything the user can get his hands on.