4 ms·
Functors, Applicatives, and Monads: You don't need to know theory to use them
- catnaroek 9y agoNothing about laws? Seriously? The laws are the entire point! (Even if some socially maladjusted people occasionally break them.)
- joyfulmantis 9y agoThe laws are important if you want to implement these typeclasses in your own data type, but I feel for new comers who will only want to use them in other data types it is better to first focus on practical application. I feel that laws and formal definitions tend to drive away newcomers from a subject that need not be so hard to understand.
- catnaroek 9y agoSorry, joyfulmantis, your comment appears “dead”, so I can't directly reply to it. Haskell's standard type classes represent algebraic structures. And to understand algebraic structures, you need the axioms that define them. There is no way around this. Of course, you also need examples, but they are by no means a replacement for definitions. If you don't understand the definitions, then you don't understand the abstraction at all.
- hakonrossebo 9y agoReally like the practical approach of explaining these concepts.