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

Re: Specification vs. Implementation

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

Michael Sperber wrote:
Per Bothner <per@xxxxxxxxxxx> writes:

If ports are required to support byte operations, then there
is little point in a separate primitive byte i/o layer.

The primitive I/O layer, besides offering more control over
performance, also allows you to create access to arbitrary data
sources easily.  Scheme systems have traditionally done this at the
ports level, but it is difficult to get right there.

I don't buy this at all.  Why can't I replace:
  (make-simple-reader id descriptor etc ...)
  (make-simple-input-port id descriptor etc ...)
I.e. why can't I merge the functionality of readers into input-ports?
That would *reduce* overhead for programs that use the port interface
(most of them) and would not add any extra overhead for programs that
want byte-level access.
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/