3 ms·
if people cannot learn the concepts when presented with the monad and functor names, but somehow are able to understand them when given different names, it seem
by GhostWhisperer 3y ago
if people cannot learn the concepts when presented with the monad and functor names, but somehow are able to understand them when given different names, it seems the issue is the names are bad
what is creating confusion is this need to sound like a pompous academic by sticking to old terminology that serves no purpose but to make their users sound enlightened and the subject hard to grok
the functional programming community could gain a lot from making it's subject more accessible, not less
- louthy 3y agoHow is it any different to someone learning OOP? * Objects * Class * Interface * Polymorphism * Parametric polymorphism * Methods * Method dispatch * Inheritance * Singleton These bear no relationship to the real world usage of these words and some are straight out of mathematics/academia also. Would you expect FP people landing in OOP land to rename all of these concepts just so FP people can understand OOP languages? Or would you expect them to learn the shared lexicon of OOP-land? It isn't pompous to have a name for something and then expect people to learn those names if they want to learn the subject. Pomposity would be attaching "oriented programming" to the end of all concepts that you don't understand and telling the world to use your new terminology whilst trampling over the existing community. Clearly grokking monads is hard. But it's nothing to do with the terminology. This presentation has over 150 slides - so even when it's called 'Railway Oriented Programming' it takes 150 slides worth of exposition to get the point across. I'd argue that the reader/listener would be in the same place if they'd have used railways as an analogy whilst telling the reader that they're learning their first monad. 'Monad' may well be an awkward word but it's clearly the mental model of the monad that's the problem. I suspect (as someone who's taught how monads work many times) that part of the problem is that once we learn how monads work, we realise they're unbelievably trivially simple. And at that moment we instantly lose the ability to explain it to somebody else because of the 'mental perspective switch' that's just happened in our brains. So we end up with a 1000 'Yet Another Monad' tutorials. This may well be the best one. But it shouldn't mean you get to change the shared lexicon.
- piaste 3y agoHot take: some of those names are bad too (e.g. 'polymorphism' is very vague), and OOP would be easier to learn if there was a beginner's vocabulary. Yes, "dynamic structural typing" is a coherent and logical name when you're familiar with type theory. But a learner can understand "duck typing" much faster. The jargon can come later. > 'Monad' may well be an awkward word but it's clearly the mental model of the monad that's the problem. I suspect (as someone who's taught how monads work many times) that part of the problem is that once we learn how monads work, we realise they're unbelievably trivially simple. I'm on team "join is way easier to understand than bind".
- thewix 3y agoWhen I was trying to learn monads no one ever gave me an example of mapping a list-returning function to a list. Everyone went on about 'effects', monad laws, etc. For some of us it's best to work backwards from something concrete and then show why the laws are important. I love how simple most things are in FP compared to OO. I also hate how poorly FP concepts are explained. I'm not saying you're wrong about people learning terminology. However, you definitely get more strange looks from FP terms than OO terms. Class, interface and object are common terms. When I mention a word like 'monad', 'monoid', 'magma', or 'functor' people look at me like I'm nuts. It's not logical. A new word is a new word. It's just FP words sound almost alien and trigger extra confusion in people.
- GhostWhisperer 3y agonone of it matters if you hope more people use and understand functional programming you overestimate how much people actually understand oop vs just winging it, in particular, inheritance and polymorphism but back to fp, if monads are, and i'm growing to agree with you this, "unbelievably trivially simple," how can it be that "grokking monads is hard"? i posit that it is only "hard" because when learning about these concepts, we read shit like "a monad is a monoid in the category of endofunctors" - that's an exaggeration but one that clearly shows how absurd some fp texts sound to outsiders edit: i get worked up with folks that write about fp the way you argue it must be written. for the few concepts i have been able to grasp i have been thoroughly impressed, but i am being impedded from learning more, or faster because of the hard to parse lingo