Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.lisp > #59354

Synonym Streams

From Alan Bawden <alan@csail.mit.edu>
Newsgroups comp.lang.lisp
Subject Synonym Streams
Date 2024-02-19 17:06 -0500
Organization ITS Preservation Society
Message-ID <867cj0qfbq.fsf_-_@williamsburg.bawden.org> (permalink)
References <6pd1+E7bUWxwHGM59@bongo-ra.co> <uqtv0o$1fckl$2@dont-email.me> <23FZrFyCKlaZfJP1R@bongo-ra.co> <20240219092306.348@kylheku.com>

Show all headers | View raw


I no longer remember why we designed this whole synonym stream thing.
(Where by "we" I really mean Dan Weinreb and Dave Moon, I was mostly
just in the room when they did this.)  I _think_ it is mimicking
something that the Multics I/O system does.

I'm not aware of any modern system where I/O has this feature.  It is
true that modern streams are often wrapped around other streams to
compose features (a text string may wrap a binary stream which may in
turn wrap an unbuffered stream, etc.), but the idea of one stream
wrapping another as an _indirection_ mechanism, so that you can
dynamically replace the wrapped stream with a different one, seems
unique to Common Lisp.

I'm not sure what problem it solves, since I don't remember ever wanting
to use it in Common Lisp (or wishing I had something like it when
programming in Java, Python, or C).  Buy maybe I'm forgetting something.

I would be interested to know of any place that _does_ use synonym
streams to solve some real problem.

- Alan

Back to comp.lang.lisp | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-17 14:08 +0000
  Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-17 16:34 +0000
  Re: CLHS on *DEBUG-IO* and others Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-02-18 22:06 +0000
    Re: CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-19 12:09 +0000
      Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-19 17:40 +0000
        Synonym Streams Alan Bawden <alan@csail.mit.edu> - 2024-02-19 17:06 -0500
          Re: Synonym Streams Spiros Bousbouras <spibou@gmail.com> - 2024-02-20 17:54 +0000
          Re: Synonym Streams steve <sgonedes1977@gmail.com> - 2024-04-14 11:36 -0400
            Re: Synonym Streams Alan Bawden <alan@csail.mit.edu> - 2024-04-14 18:49 -0400
            Re: Synonym Streams Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-15 00:49 +0000
              Re: Synonym Streams steve <sgonedes1977@gmail.com> - 2024-04-19 13:44 -0400
        Re: CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-20 17:47 +0000
          Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-20 18:18 +0000

csiph-web