[r6rs-discuss] [Formal] Leave readers and writers out of the
sperber at informatik.uni-tuebingen.de
Thu Nov 16 07:25:59 EST 2006
[I am not speaking for the editors.]
William D Clinger <will at ccs.neu.edu> writes:
> Section 15.2 of the draft R6RS specifies reader and writer
> objects, which represent arbitrary sources and sinks for
> binary data. These objects are not used anywhere else in
> the report,
That is not true. They are used in Section 15.3.8 ("Ports from
Readers and Writers").
> So long as they are a separate data type, however, they
> could be specified by a SRFI and implemented by a portable
> reference implementation.
No, they could not, because the current draft specifies no other means
for creating ports from arbitrary sinks and sources.
Instead, it is the other way around: If only the Primitive I/O library
were in the report, ports could be specified by a SRFI, and
implemented by a portable reference implementation. Moreover, the
Primitive I/O library is much easier to implement (for a Scheme system
implementor) than the Ports I/O library, which would increase the
value of such a reference implementation over one that would work the
other way around, if it were indeed possible.
This is all, in principle, demonstrated by the reference
implementation for SRFIs 79-81. Many of the details of the Port I/O
library are still in flux, which is why no reference implementation
exists for the version specified in the draft, but it is easy to see
how it could be adapted.
I guess it would be possible to allow the creation of ports from
arbitrary sinks and sources without involving separate data types for
readers and writers. As this was a stated requirement for the design
of the I/O libraries, simply deleting readers and writers is not an
option---an alternative means for doing it would be a prerequisite.
As the original author of SRFI 79, upon which the Primitive I/O
library is based, I will say that I studied many such means, as almost
every Scheme implementation offers one. I invite people working on
this issue to do likewise.
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the r6rs-discuss