Hacker News new | ask | show | jobs
by caaqil 44 days ago
> things that makes monads notoriously difficult to explain to people outside of the Haskell ecosystem

Huh, I thought a monad is just a monoid in the category of endofunctors, what's the problem?

2 comments

It's about as difficult as describing vectors in math. Vectors aren't really "little arrows" or "things with magnitude and direction" (because then functions wouldn't count), I think there's a similarly cryptic saying that "a vector is just an element of a vector space" or "a tensor is anything that transforms like a tensor".

In both cases what they really are is an abstract concept defined by things that satisfy some definitions, but in practice it's easier to just look at a few concrete examples like Maybe.

And here I was convinced that they’re burritos!

I will say that explaining functors to my coworkers was always much simpler, and then naturally led to monads

I suspect all branches of tech have their rite of passage.

For haskellers, it is writing a monad tutorial

For javascripters, it is writing a framework

For make-stuff-with-LLM people, it is producing a diagram explaining your code generation factory

... and so on