3 ms·
But the concept of monad as used in math is really quite different from how it is used in programming (like the object is the same, but the point of all the mat
by bawolff 2y ago
But the concept of monad as used in math is really quite different from how it is used in programming (like the object is the same, but the point of all the mathematical machinery of category theory is essentially to make proofs that apply to a wide variety of objects that share some abstract property. That is not the primary activity we do in programming. We do it a little bit when it comes to designing abstractions, but for the most part the mental abstractions are quite strained here).
The language of category theory is great for proving things. Its esecially great for proving things in very general ways.
Computer programming (to be clear: different from computer science) is not math. Sure programs are proofs (/me waves at howard-curry) but they are not the types of proofs math is generally interested in. Its the same task applied to different goals. The tools for both might work in both contexts, but they are not going to work equally as well.
That's not to say we shouldn't try and formalize things - we should. Category theory is just not a good design pattern language for typical programming tasks. It wasn't designed with that goal in mind, it does a bad job with it. Worse, it sounds very learned, so pseudo-intellectuals use it to gate-keep.
- agentultra 2y agoPersonal feelings about gate keeping aside, it’s better to have a name for a thing that’s in common use than to make up your own and confuse everyone. You don’t have to be a gatekeeping, academic elitist to understand how to use a monad. I use them every day at work and I program on my stream where I’m using them all the time. What’s nice about it is that if I want to go on that journey and learn more about monads so that I can build my own abstractions upon them I can go right to the source definitions. I don’t have to go look up what a BurritoWrapper is and all of the methods designed for it that only work with whatever the author designed them for. Once I know I have a monad I know how to use it. Curry-Howard is super cool and we should formalize things more.