3 ms·
Ah, another “not a monad tutorial” monad tutorial. This approach to teaching monads does seem like the more intuitive approach. The main drawback is the same
by sshine 4y ago
Ah, another “not a monad tutorial” monad tutorial.
This approach to teaching monads does seem like the more intuitive approach.
The main drawback is the same as teaching 1st and 2nd year university students about object-oriented design patterns:
The best patterns are motivated by the cost of not having them in complicated code. But you haven’t written enough complicated code yet to see the design patterns as solutions to any problems you have (had).
For this reason, learning about design before you ever got your hands dirty seems a lot like learning to swim on land. For monads, it surely seems like a lot of machinery just to implicitly keep track of state. Reaching an a-ha moment comes much later than reaching practical value from having them, which happens much later than writing purely functional code without monads. And how many people who takes a Haskell course are even already well-versed in functional languages without monads?