Hacker News new | ask | show | jobs
by patrec 2374 days ago
Monad transformers are really not the great counterexample you seem to think they are.
1 comments

Monads were described as uncomposable. Monad transformers are one way they’re composed. I don’t understand your objection.
A lot of people consider Monad transformers as an ugly hack to partially paper of the lack of compositionality of Monads (hence alternative attempts like extensible effects). Something that composes nicely has low overhead, does not introduce additional boilerplate or require making arbitrary additional choices (such as ordering). But Monad transformers do often involve non-trivial overhead, additional boilerplate (not sure how much things have progressed since mtl) and extraneous complexity.