Scott Turner reacts:

7. There's a lot of discussion w.r.t state, at least on this list. Is
threading state through many functions respectivley polluting many
functions with monads the solution?
If a function is pure, there's never any need to involve it with a monad. Monads don't cause "pollution". They serve to indicate what functions have side effects, while the choice of monad tells what kinds of side effects may occur.

Haskell people enjoy pure functions, but are not shy of side effects, which are recognized as an essential feature of every program. Functions that return monadic values provide an excellent way to organize side effects.

=====================


Please. DON'T reduce Monads to side effects. This is the domain of the
IO Monad <<et consortes>>, but Monads have many other applications/faces
you most certainly know about.


Jerzy Karczmarczuk

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to