News for hackers. Stuff that matters.
Re:Why Functional Programming Should Be the Future of Software by momentoftop on Wednesday November 02, 2022 @04:15PM (#33442327)
That article went round the Edinburgh mailing list when it was published, and Phil Wadler, who got monads into Haskell, replied saying something like "I didn't know this. Does anyone have the proof?"

The actual quote that monads are monoids in the category of endofunctors comes from MacLane, and is intended for mathematicians.

Re:Why Functional Programming Should Be the Future of Software by DonaldPShimoda on Wednesday November 02, 2022 @09:09PM (#33445324)
I'm honestly not sure the MacLane reference applies here.

Although the abstract phrasing can be traced to him, the particular use of "just" in the parent comment's quote tells me they're specifically thinking of the (deliberately condescending) version from the Iry post, especially since that's the version that gets memed throughout the FP community. After all, that particular phrasing is meant to convey a sense of "this is obvious and you are stupid if you don't understand it immediately", which is a far cry from the MacLane version (since that one is, as you said, intended for mathematicians).

But I probably ought to have included the full provenance regardless; thank you for bringing it up!

Re:Why Functional Programming Should Be the Future of Software by hither_shores on Thursday November 03, 2022 @02:15AM (#33447662)
"an X is just a Y" is a common turn of phrase in mathematical writing. It means that Xs and Ys are the same thing, whereas "an X is a Y" may, depending on context, mean only that every X is a Y. A human is a mammal, but a human is not just a mammal.

The original quote (from Categories for the Working Mathematician) is:

> All told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.