Personally, the constant (and unnecessary) reference to monads was a stumbling point when first learning Haskell. Knowing nothing at the time about category theory, “monads” seemed to me be to a magical thing that keeps your code pure and gives you IO from on high. I spent a long time puzzling over this idea of a monad (of course trying and failing to understand explanations by analogy). Eventually I realized that, while useful, they were not the magical special thing I thought. At that point, Haskell got easier. We would probably do well to talk about monads less, and be more exact about what they are, and why we care.
If something as simple as IO requires category theory to understand, then something must be way off.
Oh my god, yes, yes, yes, a thousand times yes.
As a math major who actually learned category theory as part of his education, the pervasiveness of monads in Haskell culture (mind you, it’s Haskellers who are the worst about this, not the language design itself), is one of the things that is most off-putting about it.
Also, the kind of things I used category theory for in school (Galois theory functor, topological invariants) have almost nothing to do with the kinds of category theory that Haskellers care about.
You left off the “(Luckily, it doesn’t)” part of the quote which change the meaning entirely. I’d write a longer argument of why the two concepts are orthogonal, but frankly I’m just tired of refuting so many silly superstitions about category theory and Haskell.
What the article is talking about, and I agree with, is that the Haskell culture makes monads seem a lot more important than they really are.
One of the most attractive things about OCaml is that monads are almost invisible there, both culturally and in the language. Yeah, yeah, not pure, but still, usually convenient.
Personally, the constant (and unnecessary) reference to monads was a stumbling point when first learning Haskell. Knowing nothing at the time about category theory, “monads” seemed to me be to a magical thing that keeps your code pure and gives you IO from on high. I spent a long time puzzling over this idea of a monad (of course trying and failing to understand explanations by analogy). Eventually I realized that, while useful, they were not the magical special thing I thought. At that point, Haskell got easier. We would probably do well to talk about monads less, and be more exact about what they are, and why we care.
Compare that to Rust that has a rather unique type system influenced by linear and affine types but never mentions that.
<small>actually I do mention affine types in the introductory documentation but just one time</small>
I’ll send you a pull request for purity :).
I actually consider it a great positive, to be able to introduce terminology that someone who didn’t get a degree might not know.
There’s currently an argument going on about ‘arity.’
I was obviously joking. Yes, being able to at least drop those names for those that might be interested in further discussion is interesting.
Oh yeah I mean I knew you were joking about purity, was just making a general comment :)
Types & laws.
Oh my god, yes, yes, yes, a thousand times yes.
As a math major who actually learned category theory as part of his education, the pervasiveness of monads in Haskell culture (mind you, it’s Haskellers who are the worst about this, not the language design itself), is one of the things that is most off-putting about it.
Also, the kind of things I used category theory for in school (Galois theory functor, topological invariants) have almost nothing to do with the kinds of category theory that Haskellers care about.
You left off the “(Luckily, it doesn’t)” part of the quote which change the meaning entirely. I’d write a longer argument of why the two concepts are orthogonal, but frankly I’m just tired of refuting so many silly superstitions about category theory and Haskell.
What the article is talking about, and I agree with, is that the Haskell culture makes monads seem a lot more important than they really are.
One of the most attractive things about OCaml is that monads are almost invisible there, both culturally and in the language. Yeah, yeah, not pure, but still, usually convenient.