Proposal: Export Data.Word.Word from Prelude

Bob Ippolito bob at redivi.com
Sun Aug 24 16:01:56 UTC 2014


On Sunday, August 24, 2014, Bardur Arantsson <spam at scientician.net> wrote:

> On 2014-08-24 17:27, Johan Tibell wrote:
> > On Sun, Aug 24, 2014 at 2:08 PM, Ben Millwood <haskell at benmachine.co.uk
> <javascript:;>>
> > wrote:
> >>
> >> What's left? To those enthusiastically +1-ing this proposal, how will it
> >> improve your lives?
> >
> >
> > Unsigned fixed-width integers appear everywhere in programming and
> > algorithms. Haskell is to my knowledge the only language that doesn't
> > expose such a type next to its signed version.
> >
>
> Java is a notable exception here. Usually the omission leads to pain,
> but it has to be said that it's mostly just when interfacing with C
> and/or in parsing binary formats.
>

Python, JavaScript, Erlang, Ruby, Lua are other exceptions that do not have
built-in fixed width wrap-around integer types or unsigned numbers of any
kind.

Parsing isn't a problem, wraparound is usually emulated with bitwise and.
Gets ugly.

-bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140824/21e31a2e/attachment.html>


More information about the Libraries mailing list