3 ms·
The 'why' question is my pet peeve too - often because the answer to > Why do I need a monad then, if there are similar constructs in other languages that don'
by ebola1717 10y ago
The 'why' question is my pet peeve too - often because the answer to
> Why do I need a monad then, if there are similar constructs in other languages that don't need the understanding of monad?
is that you usually don't.
Where I work, people use a handful of monads daily, but most people know the monad laws, nor do they need to.
But now that they know a few specific monads, the "why" of monads is really, well, we needed certain convenience methods (namely bind aka flatMap) to make using e.g. Maybe or promises not a huge pain. And we chose a uniform way to do it across different wrapper types, so that we minimize the cognitive overhead.