[R6RS] Changing the transcoding mid-stream

William D Clinger will at ccs.neu.edu
Fri Aug 18 10:19:34 EDT 2006


Mike wrote:
> > The ones that appear to perform binary i/o use the procedures that,
> > according to you, were not intended for binary i/o.
>
> I think we're using different definitions of the word "binary I/O".
> You seem to mean "untranscoded I/O" whereas I mean "I/O to and from
> bytes objects and octets."  Is that a correct interpretation of what
> you're asking for?

I don't want to answer in the affirmative, because
I no longer have any confidence in my understanding
of what you mean by transcoding.  You are using that
term to include both "compression or SSL or whatever"
and Unicode encoding schemes, which to me are radically
different things.  The first maps from uninterpreted
binary to uninterpreted binary, while Unicode encoding
schemes are all about interpreting binary.

What I (and most programmers, I believe) mean by binary
i/o is that you can read and write arbitrary bit patterns
without having some other layer misinterpret those bit
patterns as elements of some inappropriate type.  What
I (and most programmers, I believe) mean by mixed binary
and textual i/o is that you can, for example, mix text
with, say, the bit-level representations of IEEE double
precision floating point number within the same file.

The examples at the end of the SRFI do not show me how
to do that, and I do not even see how to do it without
implementing my own translator(s) for Unicode encoding
schemes.  If my current beliefs are correct, then the
claims made by the SRFI are misleading, and in my view
the SRFI is inadequate as a basis for R6RS i/o.

I think we should either change the proposal so it can
support what most programmers mean by mixed binary and
textual i/o, or we should change the proposal to support
completely separate binary and textual i/o through
completely separate sets of i/o procedures, or we should
give up on binary i/o for R6RS and eliminate all of the
operations that give the misleading impression of
performing (what most programmers mean by) binary i/o.

Will



More information about the R6RS mailing list