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

Re: [Scheme-reports] Bidirectional ports and port-open?

On 06/30/2012 09:19 PM, Marc Feeley wrote:
> Bidirectional ports may be useful to represent operating devices such
> as serial ports, terminals, and network connections.

Such "ports" are two independent input and output ports, with
no real interaction between the sub-ports.  So why is the concept
of a "bidirectional port" useful in this case?

An true bi-directional port is one where you can read a "record",
modify it, and write it back.  If the port is seekable, the input
and output positions are tied.  Only binary (not text) is likely
to be meaningful, though in theory you could have other port kinds.
(A "port" is basically an abstract array with a current position,
plus various operations that update the array or position.)
	--Per Bothner
per@x   http://per.bothner.com/

Scheme-reports mailing list