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

synonym streams



	Does a synonym stream have all the rights and duties of a
normal stream?  In particular, can you create a synonym stream for
a synonym stream?

	In practice, it's seeming as though the latter does not work.
I tried to create a synonym stream for *standard-output* (forgetting
that it itself is a synonym for *terminal-io*).  E.G.

        (setq *memory-output* (make-synonym-stream '*standard-output*))
        (princ "stuff" *memory-output*)

and found that the print statement hangs (Allegro CL 3.1.4 [Sun4]).  The
above works fine when *memory-output* is defined as a synonym for
*terminal-io*.   I would report this more formally as a bug if I were 
sure that the language spec allowed this sort of maneuver -- Steele
is unclear on the point (CLtL, p.329).

	If synonyms for synonyms are forbidden, is there reason to be wary
of intermixing synonym and broadcast streams?  (What I really want to do
is make a synonym for a broadcast stream, which in turn names a synonym
stream as one of its recipients (yes, I have reasons for wanting all this
indirection!)).   If this is possible, are there resource limits that
might make it a bad idea to be so profligate about creating streams (like
perhaps a ceiling on the number of open ones)?


 --- .    --- .    --- .    --- .    --- .    --- .    --- .    --- .     
     |  | |||         |  | |||       |  | |||      |  | |||      |  | |||     
Tim Converse                    "Poker without beer and cigars is like
converse@cs.uchicago.edu         a day without sunshine and hurricanes"