[Haskell-cafe] Re: Monads aren't evil

Neal Alexander wqeqweuqy at hotmail.com
Thu Jan 8 22:07:39 EST 2009


Ertugrul Soeylemez wrote:
> Hello fellow Haskellers,
> 
> When I read questions from Haskell beginners, it somehow seems like they
> try to avoid monads and view them as a last resort, if there is no easy
> non-monadic way.  I'm really sure that the cause for this is that most
> tutorials deal with monads very sparingly and mostly in the context of
> input/output.  Also usually monads are associated with the do-notation,
> which makes them appear even more special, although there is really
> nothing special about them.
> 

Yea, i was the same way when i started learning Haskell. I understood 
how Monads worked, and what the motivation was for them, but not why i 
would want to restructure code to use them in specific instances.

"Why should i care about monads when i can use Arrows or (.)" was also a 
factor.

Its kinda like getting advice from an adult as a child. You have no 
particular reason to distrust the advice, but the value of it doesn't 
set in until something happens to you first hand to verify it.

For me the turning point was writing some code that needed to handle 
running code locally/remotely in a transparent manner.

Maybe having a list of real-world usage scenarios or exercises on the 
wiki may help.



More information about the Haskell-Cafe mailing list