[Haskell-cafe] about Haskell code written to be "too smart"

Manlio Perillo manlio_perillo at libero.it
Wed Mar 25 08:50:48 EDT 2009

wren ng thornton ha scritto:
> Manlio Perillo wrote:
> [...]
> Following directly from the Rule of Least Power, if you can get away 
> with foreach then that's what you should use. Why? Because the less 
> power the construct has, the fewer corner cases and generalizations a 
> reader of the code needs to consider. Now, just because iterators exist 
> does not mean that one should never use the more general tool. If you're 
> fighting to break out of your chosen straitjacket, then chances are it's 
> the wrong one to use in the first place; it'd be clearer to use more 
> power and have less fighting.

 > [...]

Note that, as I have already written, I agree with you.
And this is one of the reasons i like Haskell.

The main problem, here, is that:
- recursion and pattern matching are explained in every tutorial about
   functional programming and Haskell.

   This is the reason why I find them more "natural".

- high level, Haskell specific, abstractions, are *not* explained in
   normal tutorials or books.
   The libraries where these concepts are implemented, are not well
   Most of the "documentation" is in research papers, and a "normal"
   programmer don't want to read these papers.

   Only in the recent "Real World Haskell", all these high level
   abstraction have been properly documented


More information about the Haskell-Cafe mailing list