[Haskell-cafe] Re: Monads aren't evil? I think they are.

Ertugrul Soeylemez es at ertes.de
Thu Jan 15 20:03:52 EST 2009

"Apfelmus, Heinrich" <apfelmus at quantentunnel.de> wrote:

> [...] but this is very different from using a particular monad like
> the state monad and hoping that using it somehow gives an insight into
> the problem domain.

You're right, mostly.  However, there are a lot of problems, where you
cannot provide any useful abstraction, or the abstraction would destroy
the convenience and clarity of expressing the problem as something as
simple as a stateful computation.

The 'insight' into a problem often comes from expressing its solution,
not the problem itself.  Please consider that I'm talking about
real-world applications, so my problems are things like internal
database servers.  Of course, there may be better ways to model such a
thing, but a 'StateT (Map a b) IO' computation is the way to go for
someone, who wants to get the job done rather than doing research, and
in fact I think this is a very beautiful and elegant approach exploiting
Haskell's (or at least GHC's) great RTS features.


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Haskell-Cafe mailing list