Re: [Haskell-cafe] Integers v ints

2010-04-05 Thread Jens Blanck
Thanks for your replies. In particular to Jon for the reference to the Haskell 98 standard and the comment about language design. If anyone has further references to Haskell 98 or Erlang, I'm still interested. Regarding cost, I do see the difference in factors (Integer - Int, and computable real

Re: [Haskell-cafe] Integers v ints

2010-04-03 Thread Lennart Augustsson
The cost factor of Integer vs Int is far, far smaller than the factor between computable reals vs Double. On Thu, Apr 1, 2010 at 6:33 PM, Jens Blanck wrote: > Yes, the cost for computable reals will be an order of magnitude or possibly > two for well-behaved computations. For not well-behaved pro

Re: [Haskell-cafe] Integers v ints

2010-04-02 Thread Henning Thielemann
Jens Blanck schrieb: I was wondering if someone could give me some references to when and why the choice was made to default integral numerical literals to Integer rather than to Int in Haskell. Also, if you are aware of similar discussions in other languages. I think type defaulting is only an

Re: [Haskell-cafe] Integers v ints

2010-04-02 Thread David Menendez
On Thu, Apr 1, 2010 at 5:27 AM, Jens Blanck wrote: > I was wondering if someone could give me some references to when and why the > choice was made to default integral numerical literals to Integer rather > than to Int in Haskell. Also, if you are aware of similar discussions in > other languages.

Re: [Haskell-cafe] Integers v ints

2010-04-02 Thread Jesper Louis Andersen
On Thu, Apr 1, 2010 at 11:27 AM, Jens Blanck wrote: > I was wondering if someone could give me some references to when and why the > choice was made to default integral numerical literals to Integer rather > than to Int in Haskell. Also, if you are aware of similar discussions in > other languages

Re: [Haskell-cafe] Integers v ints

2010-04-01 Thread Jens Blanck
On 1 April 2010 10:53, Ivan Lazar Miljenovic wrote: > Jens Blanck writes: > > I was wondering if someone could give me some references to when and why > the > > choice was made to default integral numerical literals to Integer rather > > than to Int in Haskell. > > My guess is precision: some num

Re: [Haskell-cafe] Integers v ints

2010-04-01 Thread Ivan Lazar Miljenovic
Jens Blanck writes: > I was wondering if someone could give me some references to when and why the > choice was made to default integral numerical literals to Integer rather > than to Int in Haskell. My guess is precision: some numeric calculations (even doing a round on some Double values) will

[Haskell-cafe] Integers v ints

2010-04-01 Thread Jens Blanck
I was wondering if someone could give me some references to when and why the choice was made to default integral numerical literals to Integer rather than to Int in Haskell. Also, if you are aware of similar discussions in other languages. I'd like to use this information to make an analogous case