Why are byte ports "ports" as such? Ben Goetter (13 Apr 2006 17:54 UTC)
Re: Why are byte ports "ports" as such? John Cowan (13 Apr 2006 18:04 UTC)
Re: Why are byte ports "ports" as such? Marc Feeley (13 Apr 2006 21:41 UTC)
Re: Why are byte ports "ports" as such? John Cowan (14 Apr 2006 12:49 UTC)
Re: Why are byte ports "ports" as such? Marc Feeley (14 Apr 2006 13:37 UTC)
Re: Why are byte ports "ports" as such? Marc Feeley (13 Apr 2006 22:03 UTC)
Re: Why are byte ports "ports" as such? Ben Goetter (14 Apr 2006 01:02 UTC)
Re: Why are byte ports "ports" as such? Marc Feeley (14 Apr 2006 01:52 UTC)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
Re: Why are byte ports "ports" as such? John Cowan (24 May 2006 16:06 UTC)
(missing)
(missing)
Re: Why are byte ports "ports" as such? Thomas Bushnell BSG (24 May 2006 16:26 UTC)
Re: Why are byte ports "ports" as such? John Cowan (24 May 2006 17:18 UTC)
Re: Why are byte ports "ports" as such? Marc Feeley (24 May 2006 18:11 UTC)
(missing)
(missing)
Re: Why are byte ports "ports" as such? Marcin 'Qrczak' Kowalczyk (24 May 2006 16:17 UTC)
Re: Why are byte ports "ports" as such? John Cowan (14 Apr 2006 12:26 UTC)

Re: Why are byte ports "ports" as such? John Cowan 14 Apr 2006 12:26 UTC

Marc Feeley scripsit:

> But with SRFI 91 you do gain the ability to mix reading bytes and
> reading characters on the same port.

Rather than a design in which byte ports *are* character ports,
I'd prefer a design in which character ports are *constructed from*
byte ports.  Advantages:

	Byte ports do not have to carry about character-port
	attributes such as encodings, so they are more lightweight;

	Character port attributes can be immutable, since if
	you don't like the current character port, you can ask
	for a new character port on the same byte port
	(this requires a character-port procedure to return the
	underlying byte port if any);

	Character ports that aren't backed by byte ports are
	not a special case.

In order to do mixed-mode I/O, you require unbuffered character
ports, though the underlying byte ports can be buffered or unbuffered.
(In any case, I'd like to see evidence that buffering characters
as opposed to bytes is a Good Thing.)

--
Where the wombat has walked,            John Cowan <xxxxxx@ccil.org>
it will inevitably walk again.          http://www.ccil.org/~cowan