On Mon, Sep 14, 2009 at 04:26:04PM -0500, Brian Mastenbrook wrote:
> On Sep 14, 2009, at 4:05 PM, John Cowan wrote:
> 
> > The alternative is to make binary ports and text ports *completely*
> > disjoint, with the consequential duplication of all the procedures for
> > managing them.
> 
> Not all. You don't need the equivalent of `with-open-input-file', for  
> instance, since `current-input-port' would never sensibly be set to a  
> binary port.

Why ever not?  I frequently use binary standard input ports when
piping audio or compressed data between unix processes.  Sure,
I mostly do that in C, but I want to do it in scheme in the
future.

FWIW, when dealing with file formats (and wire protocols),
you're very often going to have to do something that isn't part
of whatever standard you're using, anyway, simply because you
aren't in control of the format in question.  It seems to me
that u8 (byte stream) low-level IO with an available library of
flexible encoders and decoders is a perfectly useful way to go.

... and that sounds like WG2 territory.  I'm not sure that
byte-IO or anything other than textual R5-level read/write is
necessary in Thing-1.

Or maybe Thing-1 can do u8 IO, and has byte-vectors, just so
that they're there in the standard, and spelled the same way
everywhere, but you wouldn't try to do anything "clever" or
useful with them without pulling in a codec library from WG2.

Cheers,

-- 
Andrew

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to