4 ms·
Monads are very easy to explain to anyone used to reading mathematical definitions. It’s the people without a math background that struggle so much. They insist
by chongli 5y ago
Monads are very easy to explain to anyone used to reading mathematical definitions. It’s the people without a math background that struggle so much. They insist on all of these real world analogies. The problem with that stipulation is that monads are too abstract and general to have a real world analogue.
They are a fantastic and incredibly powerful abstraction though. Their mathematical properties, termed the monad laws, make sure of that.
- bluepoint 5y agoI have a strong mathematical background, I get the definitions, I understand very well the typical examples like the IO monad, yet I frequently have a hard time following more complex monad use examples. Especially transformers. So, I suppose it is not enough to understand the definitions, you really need to think of them as some form of a language.
- chongli 5y agoI think that’s the case with any concept in computer science or math. It’s easy enough to explain integration to someone using simple examples like f(x) = x^2 but it gets a lot more difficult when you introduce Stokes’s theorem and differential forms. Most of the people complaining about monads are not in your situation. They are struggling to grasp even the most basic examples because they understand concepts only by analogy to other things they already know and monads don’t map to anything they know.
- Zababa 5y agoYou can also explain them as interfaces, although as you said it gets harder when you get to the "why".
- cabalamat 5y ago> It’s the people without a math background that struggle so much. You mean like most programmers?