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

Re: binary vs non-binary ports

This page is part of the web mail archives of SRFI 56 from before July 7th, 2015. The new archives for SRFI 56 contain all messages, not just those from before July 7th, 2015.



At Fri, 17 Sep 2004 23:26:50 +0200, Hans Oesterholt-Dijkema wrote:
> 
> Dear SRFI-56 members,
> 
> > If people wish to have the means of ensuring a binary port in
> > portable way, I'd rather have open-binary-{input|output}-file,
> > which can be easily implemented on both (a) implementations that
> > doesn't distinguish binary/character port, and (b) implementations
> > that requires binary/character distinction at port creation.
> 
> I have a different opinion about this open-binary-input|output-file.
> 
> What about the following existing constructs:
> 
>   open-input|output-string
>   open-input|output-cstring (bigloo)
>   open-input|output-pipe
>   open-input|output-socket
>   (values input-port output-port) run-process command (mzscheme?)

The latter or similar exist in many Schemes but not in R5RS so we
can't say much about them.  Whatever solution we come up with for file
ports we may apply to string ports as well.

> The functions in SFRI-56 are saying enough about the binary
> character of the primitives.
> 
> I think, one should not interfere with the creative process of 
> software engineers by limiting the possibilities of the language 
> at hand.

While I agree with you, the SRFI process is about increasing
portability, so I'd like to accomodate the major Scheme
implementations as much as possible.  None of the compromises we are
looking at would require port types to be disjoint so an implementor
is free to ignore the distinction if they choose.

-- 
Alex