3 ms·
Lots of people already have. The problem is that those who try to read up on it haven't built the conceptual bridge to get there. Monads are a simple piece but
by chongli 10y ago
Lots of people already have. The problem is that those who try to read up on it haven't built the conceptual bridge to get there. Monads are a simple piece but they sit atop a tower of simple pieces, none of which can be skipped. People who hear about Haskell try to jump in and learn them without having the foundation they need. They see the superficial similarities between Haskell and other languages but fail to grasp the more significant differences: higher-kinded types and type classes.
- coldtea 10y ago>Lots of people already have. The problem is that those who try to read up on it haven't built the conceptual bridge to get there. No, as someone who understands monads (and not thanks to the explanations usually given) the real problem is that most explanations are crap and needlessly complicate the matter. Including every one I've read thus far (well, up to when I made my comment) in this thread. It's as if they can't lay off Haskell notation and concepts for a moment to give people the overall picture. People, stop mentioning "functors", "monoids", ">>=", "bind" etc in your Monad explanations. Also drop the Haskell function definitions. Even fmap shouldn't be taken for granted (as something already known) in a Monads explanation. Just describe what it does, giving a simple example. And when talking to Javascript programers use types and names of types that they already know, such as "array", not List. Even such simple terminology distinctions like those matter. >They see the superficial similarities between Haskell and other languages but fail to grasp the more significant differences: higher-kinded types and type classes. The whole magic of explaining is to give an idea of the "significant differences" without requiring any foundation beyond what an average blub programmer already has.
- jnordwick 10y agoThe condescension bugs me a little: I must not have enough background, Haskell is too high-level for me, etc... I'm a pretty good developer, and my language skills are all over the place. I did a lot of Scheme and Lisp early on. I used to try all the turing tarpit languages. I do mostly C++ and Java systems work now. And my current learning is Go and Rust. I've literally written my resume in PostScript years ago, and I still use APL-derived languages. I read and learned lambda calculus over a cross country business trip even. And even with this background I find Haskell at times inscrutable, more often than not because somebody is trying to give me a description filled with unknown terminoligy and lines of Haskell itself I have no idea what it means. There concepts aren't foreign to every other languages. Show them to me in pseudo-lisp, and I'm sure I'll do a pretty good job of picking them up. It looks like you could even describe monads in C by passing around opaque pointers, with some caveats.