[Haskell-cafe] list comprehansion performance has hug different

Junior White efiish at gmail.com
Thu Jan 31 06:59:10 CET 2013


Thank you everyone! I like Haskell because the following two reasons:
1. It is beautifully
2. There are many great guys like you here.

I will work harder on it, and forgive me for my broken English.



On Thu, Jan 31, 2013 at 12:41 AM, Rustom Mody <rustompmody at gmail.com> wrote:

>
>
> On Wed, Jan 30, 2013 at 5:32 PM, Junior White <efiish at gmail.com> wrote:
>
>>
>>
>> Thanks for your reply!  I must learn more to fully understand what's
>> going on inside the list comprehension.
>> But when I frist learn Haskell, it says sequence doesn't matter, but now
>> it is a big matter, can compiler do some thing for us? I think this
>> behavior is not friendly to newbies like me, I will take a very long time
>> to work through it.
>>
>
> Good point.  Being a programmer means having to juggle many hats -- two
> important ones being the mathematician-hat and the machine-hat, also called
> declaration and 'imperation'  Get only the first and your programs will run
> very inefficiently.  Get only the second and your program will have bugs.
>
> Specifically in the case of list comprehensions the newbie needs
> - to practice thinking of the comprehension like a set comprehension and
> ignoring computation sequences
> - to practice thinking of comprehension in terms of map/filter etc ie
> operationally
>
> Both views are needed.
> Rusi
> --
> http://www.the-magus.in
> http://blog.languager.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130131/ec49b459/attachment.htm>


More information about the Haskell-Cafe mailing list