[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sven Hartrumpf scripsit:
> I fear that an input/output port is not supported in several major Scheme
> implementations. It would be much better to have 'socket-ports' that
> returns two values: the input port and the output port.
I don't agree, because much of the time you want to both read and write
from a socket, certainly in the dominant client-server paradigm. So you
end up wanting to package up the two ports in a single record, and why
not make that record behave like a port while you are at it?
Note that we ensured in R7RS-small that close-port closes both the input
and the output side of a bidirectional port, even though the small language
provides no ways to create such ports. The presence of close-input-port
and close-output-port permits fine control when that is desirable.
John Cowan <cowan@xxxxxxxx>
.e'osai ko sarji la lojban.
Please support Lojban! http://www.lojban.org