
On Wed, May 03, 2006 at 02:01:46PM +0400, Bulat Ziganshin wrote:
On 02.05 13:05, Ashley Yakeley wrote:
openTCP4 :: IP4Address -> Word16 -> IO (TCPConnection IP4Address) -- or use classes
This is going to be painfull for applications that want to support multiple protocols. Why should most applications care whether it is an IPv4 or an IPv6 address if everything just works?
type classes?
(it's universal answer, after all :) )
How many functions would benefit from increased type-safety? I only see getsockname and getpeername... Not much benefit for the added burden. For applications dealing with many simultaneous connections on different protocols you would probably resort to an existential wrapper that would hide the type of protocol. It would make more sense if Haskell's support for existential types was more standard, lightweight and straightforward. Best regards Tomasz