Email list hosting service & mailing list manager

socket-port Sven Hartrumpf (18 Jun 2013 06:38 UTC)
Re: socket-port John Cowan (18 Jun 2013 18:26 UTC)
Re: socket-port Takashi Kato (18 Jun 2013 19:09 UTC)
Re: socket-port Shiro Kawai (18 Jun 2013 21:40 UTC)
(missing)
Re: socket-port Shiro Kawai (18 Jun 2013 21:54 UTC)
Re: socket-port Alex Shinn (19 Jun 2013 00:51 UTC)
Re: socket-port Takashi Kato (19 Jun 2013 20:07 UTC)
Re: socket-port Shiro Kawai (20 Jun 2013 17:30 UTC)

Re: socket-port John Cowan 18 Jun 2013 18:26 UTC

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                              <xxxxxx@ccil.org>
            http://www.ccil.org/~cowan
                .e'osai ko sarji la lojban.
                Please support Lojban!          http://www.lojban.org