Discussion: Why is inet_addr in IO?

Brandon Allbery allbery.b at gmail.com
Thu Aug 28 15:30:08 UTC 2014


On Thu, Aug 28, 2014 at 11:28 AM, Thomas DuBuisson <
thomas.dubuisson at gmail.com> wrote:

> I'd be in favor of a more drastic change, such as removing inet_addr
> entirely .  Largely because `inet_addr("255.255.255.255") ~
> inet_addr("foobar")` as noted by the inet_addr man page.  Let's add an
> `inet_aton :: String -> m String` for some `m`.
>

Or, as previously noted, go straight to getaddrinfo and friends, which have
sensible interfaces *and* support more than IPv4.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140828/187f0d91/attachment-0001.html>


More information about the Libraries mailing list