Hacker News new | ask | show | jobs
by LessDmesg 2374 days ago
Monads are still programmable semi-colons, though. Yes, there are a lot of things you can program into a line-end symbol. Yes, some of those things are general and work for any already modded semi-colon. But it's still just programmable semi-colons: implicit, uncomposable, and frankly better left alone.
2 comments

>implicit

You'll have to elucidate, I don't follow.

>uncomposable

Demonstrably false, see monad transformers.

>better left alone.

"Yeah, well, that's just, like, your opinion."

Monad transformers are really not the great counterexample you seem to think they are.
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.
> Monads are still programmable semi-colons, though

No, they’re not. That’s just an analogy that’s sometimes useful when describing them to imperative programmers to aid intuition.