3 ms·
In Haskell there is a kind of syntactic sugar called "do-notation" that simplifies working with monadic code and is bolted onto the core of the language. But it
by danidiaz 13y ago
In Haskell there is a kind of syntactic sugar called "do-notation" that simplifies working with monadic code and is bolted onto the core of the language. But it is not necessary, you can program with monads without it.
"It it seems like monads get created when a pain point of a language is so often, and so consistently worked around in the same fashion"
Well, pretty much. Here is a post about that: http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html http://blog.sigfpe.com/2006/08/you-could-have-invented-monad...
Then there is the mathematical aspect to them, that can point to unexpected connections and new possibilities for abstraction.
- Mithaldu 13y agoI'm not sure what to think about this answer. The first paragraph doesn't seem to address anything i said. The linked article seems to agree with my understanding, from the preamble, but contains too much Haskell syntax for me to ne able to understand what he's explaining, so i can't say for sure. And i know even less about the mathematical aspect. However, still, thanks for letting me know that i might be moving in the right direction.