Hi Eric,
On Wed, 03 Jan 2007 14:44:38 +0100, Eric Marsden eric.marsden@free.fr wrote:
Thanks for flexi-streams, I am starting to use it in some projects, and it is most useful!
You're welcome... :)
In flexi-streams version 0.9.1 the class IN-MEMORY-STREAM does not inherit from FLEXI-STREAM. Is there a fundamental reason for there not to be a common ancestor class to these two stream classes?
Yes. The reason from my point of view is that both classes are completely unrelated (except that they both inherit from STREAM, of course). In-memory streams are binary streams layered atop Lisp sequences, flexi streams are character streams layered atop Lisp streams. Flexi streams are there to provide portable external formats and the ability to changes these on the fly. In-memory streams are there to provide a binary equivalent to WITH-INPUT-FROM-STRING and related ANSI functionality. Flexi streams are a thin layer above an existing stream, in-memory streams create a new "virtual" stream from an unrelated data structure.
They happen to be defined in the same open source library, but that's just because I was too lazy to start a separate project for in-memory streams... :)
It would be useful when doing CLOS or TYPECASE dispatch on various types of streams.
What would be a real-world scenario where you'd like to treat a flexi stream like an in-memory stream?
Cheers, Edi.
[Cc to mailing list.]
flexi-streams-devel@common-lisp.net