Re: Sockets Layer Counter Proposal John Cowan 01 Nov 2012 22:11 UTC

Aaron W. Hsu scripsit:

> >Like R[67]RS call-with-port, it makes sure the socket is closed if proc
> >terminates normally, a non-trivial difference.
>
> Okay, in this case I fail to see the reason for the explicit socket
> argument. I do think that the automatic closing could be useful, but
> in the form specified by 106 I think it's too awkward and annoying
> to use. I'd probably prefer:
>
>   (call-with-socket domain type protocol proc)

That's a different thing.  Like call-with-port, call-with-socket
encapsulates the idea "I have a port/socket, which I obtained however.
I want to run this procedure with unwind protection so that the
port/socket will be closed when I'm done."  The call-with-socket you
have here is more like call-with-{input,output}-file.

--
No,  John.  I want formats that are actually       John Cowan
useful, rather than over-featured megaliths that   http://www.ccil.org/~cowan
address all questions by piling on ridiculous      xxxxxx@ccil.org
internal links in forms which are hideously
over-complex. --Simon St. Laurent on xml-dev