Did bad high-school mathematics education conditioned us all to hate everything that's related to mathematics?<p>Label a concept "this is just engineering practice" or "this is just physics. this equation describes how universe works" and people will happily accept it as is.<p>But label it "mathematics" and explanations are in order because maths is hard to understand...<p>I don't see any posts where authors concern themselves with metaphors for Maxwell's equations (or anything else in physics; maybe I'm hanging out in the wrong circles though).<p>What is a process of understanding a mathematical equation? Stare at it until you grok it? Use it to solve problems to get a feel of what it means? Write proofs about it so you can state some properties with certainty?<p>I don't know what the best/structured process is, but the core is "take this equation and do something with it".<p>Do the same with monads! I think people having problems understanding monads are those that defer writing any code until they feel "they get it". Instead of "now I get it, monads are burritos, time to write some code" one should write some code <i>in order to understand monads</i>
This coming from the "you don't really understand a topic until you learn its maths" school. I don't mind that position as there's some truth to it, up until they commit the mistake to consider metaphors harmful and an obstacle.<p>I greatly benefited from the "conveyor belt" metaphor for learning monads; it made me grasp instantly something that I would have never understood from a pure theoretical explanation - namely <i>why</i> they are so useful and widespread in functional programming, as a building tool to distribute logic among several composable functions over a data type. Sentences like "We start with one thing and use its value to compute a new thing" and "Monads are an abstract, mathematical label affixed to a pattern found in almost all code" will never convey information about how it's intended to be used in the same vivid way as the metaphor.<p>I know for true that the pure mathematical approach leaves me hanging. I learned linear algebra in the theorem-proof style, and as of today I still don't know when it's an adequate technique to use. I can't tell what matrix ranks, kernels or tensors are good for even though I can calculate their values very precisely.
Anybody who didn't know what monads were and now reached an epiphany thanks to this article please comment.<p>Also is there anyone here who understands what monads are but has never programmed in haskell or a functional language?
This article seems a bit heavy on the computational monads.<p>Monads don't necessarily have anything to do with sequencing or computation, and the author is objectively incorrect to say "monads are a pattern, not a specific type". In fact, monads are an algebraic structure, defined only by the types of the operations defined on them and the laws those operations obey.<p>That's not to say that concrete examples like the one here aren't useful, but the author is not covering the full scope of what monads are.
Brushing aside "you can do anything in one language that you can in another," what do monads allow me to do <i>better</i> that I can only approach without them?<p>I've tried reading (but not coding), and all I hear is sequence of operations, chaining, and similar. I know I'm missing something.<p>Basically I haven't seen or synthesized the tl;dr that makes me want to learn a language that has them.
Metaphors a tricky. Reminds me of the many attempts to explain objects and classes in terms of real-world object. (Cars, fruits, persons etc.) These explanations are often more confusing than enlightening, since object and classes are actually not like real world objects at all.