[Haskell-cafe] Re: Coming up with a better API for Network.Socket.recv

Achim Schneider barsoap at web.de
Thu Feb 26 18:07:25 EST 2009

"Bryan O'Sullivan" <bos at serpentine.com> wrote:

> There's another problem with the network APIs: they mirror the BSD
> socket API too faithfully, and provide insufficient type safety. You
> can try to send on an unconnected socket, and to bind a socket that's
> already connected, both of which should be statically forbidden. The
> APIs for datagram-oriented networking ought to be distinct from the
> stream-oriented variety, I think, even if the underlying C-level
> calls end up being substantially the same.
Iteratees to the rescue? Ideally, we'd have a composable IO system
that's uniform across different types of IO.

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list