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

query about make-broadcast-stream

    Date: Mon, 2 Jan 1984  12:02 EST
    From: Scott E. Fahlman <Fahlman@CMU-CS-C.ARPA>

    From Moon:

	What does the last phrase in the description of make-broadcast-stream
	("every operation results in nil") mean?  This phrase was not present in
	the Excelsior edition.  The values returned by the Common Lisp stream
	functions are defined with each function and are not up to the stream.
	There isn't (in Common Lisp) anything else that could be called an

    Since nobody else has popped up to answer this question, I'll try.  It
    seems very clear to me that the "every operation results in NIL"
    business is a slip-up and should not be there.  In case there is not
    really an output stream you want all output to be discarded, but write
    operations should return whatever they would normally return.  Perhaps
    Guy was trying to say that any operation whose return value is undefined
    if there is no real stream, such as STREAM-ELEMENT-TYPE, would return
    NIL for this type of stream.

It seems clear to me that if it is defined at all, STREAM-ELEMENT-TYPE of
such a stream should be (AND), otherwise known as T.  It's the intersection
of the stream-element-types of the streams it broadcasts to.

    If Guy really intends this phrase to be taken seriously, which implies
    special-casing every stream operation to handle this case, then some more
    motivation and discussion is needed.  In the absence of such, we are
    treating this as an error.

I agree with you.  In our implementation (make-broadcast-stream) returns
a stream that accepts all output and throws it away.