3 ms·
Ok, this seems a bit better than the spacesuit and bananas metaphor, but we'll have to wait for the future posts to see whether it is really better. He does vee
by hristov 16y ago
Ok, this seems a bit better than the spacesuit and bananas metaphor, but we'll have to wait for the future posts to see whether it is really better. He does veer into spacesuit bananaisms (e.g. the ghosts and the hand grenades) but maybe he will explain those metaphors better in the future.
P.S. Spacesuit bananaism is a new term I just coined to refer to people that use thoroughly baffling metaphors to explain already confusing Haskell concepts thus managing to make Haskell even more confusing and ending up with gibberish even the most seasoned Haskell pros cannot grasp. It comes from some guy's attempt to explain monads with a metaphor involving spacesuits and bananas.
- tmhedberg 16y agoOut of all the confusing and misleading monad tutorials out there, this one finally made it click for me: http://ertes.de/articles/monads.html http://ertes.de/articles/monads.html. He doesn't use any off-the-wall analogy like spacesuits or ghosts inside of boxes. Instead, he just explains monads for what they essentially are: reified future computations. Once I saw monads for what they are, instead of all the things they are not (e.g. bananas), it all seemed so simple. The fundamental similarities between various monads such as IO and lists, which had previously eluded me, really came into focus. I wish more tutorial writers would realize that just because someone is a novice doesn't mean a challenging concept must be candy coated or abstracted to the point of near-meaninglessness in order to be palatable. Quite the opposite, in many cases.
- njs12345 16y agoI found that what made them click was writing them by hand. Writing a few simple programs using the Maybe, Reader, State and List monads and then implementing them by yourself from first principles clearly demonstrated for me that there was nothing magic at all about how they worked :)