[Haskell-beginners] Doubts about functional programming paradigm

Dimitri DeFigueiredo defigueiredo at ucdavis.edu
Mon Dec 14 02:03:43 UTC 2015


Oops! Sorry, I think I wasn't clear. I know the answers to all the 
questions I asked. They were rhetorical questions.

I just wanted to make a point that learning haskell is *much* harder 
than learning most other programming languages and the (multitude of) 
learning aids that are available are not yet cohesive enough to present 
a clear path ahead for the average programmer. I also think this is the 
main reason haskell will NOT be more widely used any time soon, despite 
its many other advantages.

I think newcomers to the language should know this before they start to 
evaluate their reasons and seek help from others (as in this list) to 
guide them in the process.

Thank you very much for the pointers in any case, they look very good.

Dimitri

On 12/13/15 9:51 PM, Henk-Jan van Tuyl wrote:
> On Sat, 12 Dec 2015 01:56:48 +0100, Dimitri DeFigueiredo 
> <defigueiredo at ucdavis.edu> wrote:
>
> :
>> Couldn't match expected type ‘r’ with actual type ‘COParseResult’
>>        ‘r’ is a rigid type variable bound by
>>            the type signature for
>> getParseResult :: ParseResult r => String -> IO r
>>              ...
>>
>> I have a PhD in computer science, but never really liked programming
>> languages back then and somehow I never learned what a "rigid type
>> variable" is.
>
> See
>   [Haskell-cafe] What is a rigid type variable?
> https://mail.haskell.org/pipermail/haskell-cafe/2008-June/044622.html
>
> :
>> But would anyone care to explain to a
>> novice in a couple paragraphs why foldl (+) 0 [1..10^9] may take 10 Gigs
>> of RAM to calculate?
>
> The foldl builds up a very long expression and evaluates it after the 
> last element of the list is reached (the evaluation is non-strict, or 
> lazy). If you use foldl' (from Data.List) instead, the calculation is 
> done per element (the evaluation is strict).
>
> For more details, see
>   Foldr Foldl Foldl'
>   https://wiki.haskell.org/Foldr_Foldl_Foldl'
>
>   Lazy vs. non-strict
>   https://wiki.haskell.org/Lazy_vs._non-strict
>
> Regards,
> Henk-Jan van Tuyl
>
>



More information about the Beginners mailing list