[Haskell-cafe] Simple newbie question - Int and Integer

Brent Yorgey byorgey at gmail.com
Thu Jul 12 14:14:22 EDT 2007

To be more precise, Int represents a machine-sized integer value, so it is
limited in size but doing math with Int values translates directly into math
on the processor.  Integer can store integer values of arbitrary size, which
is useful sometimes but is of course a lot slower, since the pieces of an
Integer value have to be stored in some sort of list, and specialized code
is used to do arithmetic with Integers by operating on the pieces and
combining the results.

How have you been learning Haskell?  I'm guessing this is probably covered
in most tutorials.


On 7/12/07, Gregory Propf <gregorypropf at yahoo.com> wrote:
> So what the hell is the difference between them?  Int and Integer.  They
> aren't synonyms clearly.  What's going on?
> ------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile<http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail>and
> always stay connected<http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail>to friends.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070712/0a46e9de/attachment.htm

More information about the Haskell-Cafe mailing list