[r6rs-discuss] [Formal] Leave readers and writers out of the report.

From: William D Clinger <will>
Date: Thu Nov 16 08:56:26 2006

I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors, and
this message should not be confused with the editors'
eventual formal response.

Mike Sperber wrote:
> > 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").

I stand corrected.

What that means is that implementators will have to
go to duplicate the functions of readers and writers
in their port i/o, but programmers will still have to
deal with readers and writers as a separate data type.
It would be simpler for everyone if the functions of
readers and writers were added to the port data type,
and readers and writers were eliminated from the
report.

Per Bothner wrote:
> So it seems the types text port and binary have largely disjoint
> operations. That suggests they should be viewed as distinct types,
> and there should be different functions for creating text ports
> and binary ports.

Agreed. There is still some advantage to viewing
both binary and text ports as subtypes of ports,
however.

> Yes, drop readers and writers. But instead allow people
> to define ports from a set of functions.

That is exactly what we should do.

Mike Sperber wrote:
> 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.

Where can we find these stated requirements?

Mike also wrote:
> 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.

Thank you.

The archived discussion of SRFI 79 contains four
excellent comments from people who have themselves
implemented serious i/o systems. Most of their
criticisms, made a year ago, still apply to the
draft R6RS.

Will
Received on Thu Nov 16 2006 - 08:56:11 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC