[Cc to flexi-streams-devel]
On Mon, 20 Nov 2006 21:50:16 +0000, "Luís Oliveira" luismbo@gmail.com wrote:
Hmm, are you supposed to be able to write a sequence of octets onto a flexi-stream with element-type character? I can't tell from the documentation, though it apparently it works on most Lisps but CLISP. If so, what exactly is the element-type for?
Several Lisps have "bivalent" streams where you can write octets as well as characters to the same stream regardless of its element type. (I'd say that in this case the element type is just some kind of "hint" provided by the person who sets it.) If I were to decide, flexi streams would also be bivalent - FLEXI-STREAMS is flexible enough to support that (note the superclasses of FLEXI-INPUT-STREAM, for example), but apparently CLISP isn't.
I'm not sure if anything in the ANSI spec (or in the Gray streams specification) explicitely forbids bivalent streams. If that's the case, at least LispWorks, AllegroCL, and SBCL are non-confirming, but I like their behaviour. My personal opinion is that CLISP's Gray stream implementation is simply suboptimal.
flexi-streams-devel@common-lisp.net