4 ms·
It's common. It's often thought that in order to program Haskell one must understand or use Monads since they are so often mentioned. That's often a mental hur
by craigsmansion 10y ago
It's common.
It's often thought that in order to program Haskell one must understand or use Monads since they are so often mentioned. That's often a mental hurdle for those interested in the language.
Two things to keep in mind here are:
-in the book "An introduction to functional programming systems using Haskell" by A. Davie (1992), Monads (or Functors or Monoids) aren't mentioned at all. That's because they hadn't been architected yet. Monads are not an inherent part of Haskell without which you can't learn or use the language.
-Monads are ordinary data types, even if syntactic sugar is provided. They are not a core aspect of the language.
An explanation I found most useful is http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html http://blog.sigfpe.com/2006/08/you-could-have-invented-monad...
One can just start programming Haskell and ignore Monads if one wants. At some point you will design them or something much like them yourself, making their understanding an "Aha!" moment.