3 ms·
The issue with monad tutorials is that they start at the top - trying to impart a generalizable understanding of the concept (which, short of category-theoretic
by rainsil 6y ago
The issue with monad tutorials is that they start at the top - trying to impart a generalizable understanding of the concept (which, short of category-theoretic explanations, requires hopelessly leaky analogies) instead of focusing on the purpose and usage of specific monads.[1][2] Abstract concepts must be first made concrete in order to understand them; in the case of monads, it's best to just look at the type signature for specific monads' "bind" (>>=) functions, as well as examples of usage, while actually using them in (permissively typed) code, rather than trying to connect burrito analogies to real life.
[1]:http://dev.stephendiehl.com/hask/#eightfold-path-to-monad-satori http://dev.stephendiehl.com/hask/#eightfold-path-to-monad-sa...
[2]:Regular expression tutorials, by contrast, virtually never attempt to explain regular languages or automata theory, which is why nobody complains about having to learn formal language theory in order to use `sed`.
A surprisingly digestible (and concrete) explaination of monads (Ch 2): http://www.cse.chalmers.se/~rjmh/Papers/arrows.pdf http://www.cse.chalmers.se/~rjmh/Papers/arrows.pdf
- raverbashing 6y agoThis They always go for the mathematical way of explaining stuff (this is not a compliment). Programmer English please, not Alien Math. (And that's me saying as someone who likes Alien math in general. But I just don't see the point in using it when programming). Ok cool, your programming language now has two worlds, the functional world and the imperative world and they have two different syntaxes and you have to pass your world as an extra parameter and etc etc And I personally find the syntactic sugar built on top of it confuses more than helps (ok, some of it is just Haskell being Haskell, but it confuses)
- x86_64Ubuntu 6y agoSpeaking of alien math. I always thought Haskell looked like the countdown sequence in Predator when the Predator sets the self-destruct sequence. It was very off-putting and scary when I first saw it. https://youtu.be/l2qZZQxMfmc?t=26 https://youtu.be/l2qZZQxMfmc?t=26
- viro 6y agoHere is an another reason it failed... I have a CS degree and I barely understand what was said here. just being honest... maybe I just need more coffee.