3 ms·
Monads cannot be a waste of time. Monads just are. It can be a waste of time to design an effect system for Haskell around monads (it's probably not) or it ca
by tome 9y ago
Monads cannot be a waste of time. Monads just are. It can be a waste of time to design an effect system for Haskell around monads (it's probably not) or it can be a waste of time to design an effect system for Javascript around monads (it might well be). But monads cannot be a waste of time.
- 3minus1 9y agoYour comment is really pedantic. Obviously the concern is whether using monads is a waste. If I say "television is a waste of time" are you also going to correct me that tvs just are?
- tome 9y agoBy no means. There's this idea floating around that monads are things that had to be "introduced" into Haskell to "solve" certain problems with purity. This idea is false. Furthermore this question misses half the point of monads, that is, that you can program generically over them. Sure, that one example makes the IO monad look just like code in any other imperative language. But I can also use do notation and monad combinators with lists, coroutines, promises, futures, ASTs, and indeed any other monad I care to come up with. It may seem that any individual monad qua monad is a waste of time but when taken in totality it is a completely different question. Since the question mentioned no other monad than IO it doesn't begin to address the important issues.