[Haskell-cafe] curious about sum

Lennart Augustsson lennart at augustsson.net
Wed Jun 17 16:05:13 EDT 2009


What do you mean by "literals are strict"?  Strictness is a semantic
property of functions, and while literals can be overloaded to be
functions I don't know what you mean.

On Wed, Jun 17, 2009 at 9:50 PM, Keith Sheppard<keithshep at gmail.com> wrote:
> Haskell's numeric literals are strict. You wouldn't want that to
> change right? It seems to me that having sum and product be strict is
> consistent with this.
>
> -Keith
>
> On Wed, Jun 17, 2009 at 11:15 AM, Thomas Davie<tom.davie at gmail.com> wrote:
>>
>> On 17 Jun 2009, at 13:32, Yitzchak Gale wrote:
>>
>>> Henk-Jan van Tuyl wrote:
>>>>
>>>> reverse
>>>> maximum
>>>> minimum
>>>
>>> Oh yes, please fix those also!
>>
>> import Prelude.Strict?
>>
>> Honestly, these functions are ones that I've *deffinately* used lazy
>> versions of, in fact, in the cases of minimum/maximum I've even used ones
>> that are super-lazy and parallel using unamb.
>>
>> It would be extremely odd to randomly decide "most people would want this to
>> be strict" based on no knowledge of what they're actually doing.  Instead,
>> why don't we stand by the fact that haskell is a lazy language, and that the
>> functions we get by default are lazy, and then write a strict prelude as I
>> suggest above to complement the lazy version.
>>
>> Bob
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
>
> --
> keithsheppard.name
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list