|
|
|
|
|
by rainsil
2110 days 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-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 |
|
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)