Re: [Scheme-reports] Bidirectional ports and port-open?
Per Bothner 01 Jul 2012 22:54 UTC
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@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports