top | item 15080989

Functors, Applicatives, and Monads: You don't need to know theory to use them

4 points| joyfulmantis | 8 years ago |joyfulmantis.github.io | reply

4 comments

order
[+] catnaroek|8 years ago|reply
Sorry, 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.

[+] catnaroek|8 years ago|reply
Nothing about laws? Seriously? The laws are the entire point! (Even if some socially maladjusted people occasionally break them.)
[+] joyfulmantis|8 years ago|reply
The 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.
[+] hakonrossebo|8 years ago|reply
Really like the practical approach of explaining these concepts.