[Haskell-cafe] Monads aren't evil
Ertugrul Soeylemez
es at ertes.de
Thu Jan 8 17:16:52 EST 2009
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.
I appeal to all experienced Haskell programmers, especially to tutorial
writers, to try to focus more on how monads are nothing special, when
talking to beginners. Let me tell you that usually 90% of my code is
monadic and there is really nothing wrong with that. I use especially
State monads and StateT transformers very often, because they are
convenient and are just a clean combinator frontend to what you would do
manually without them: passing state.
Greets,
Ertugrul.
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/
More information about the Haskell-Cafe
mailing list