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

Re: Specification vs. Implementation



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 ...)
by
  (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/