Hacker News new | ask | show | jobs
by eru 1574 days ago
> Well actually this is not an aphormism, it's not even a propositional statement, because “X is a monad” is just math-speak for “X is composable”, just like “Y is a functor” is math-speak for “Y is mappable”.

Nah. Monads are one relatively special way to compose stuff. And monads don't even compose very well.

To give example: the weaker applicative functors (to use Haskell's terminology) compose much better.

https://en.wikipedia.org/wiki/Applicative_functor

1 comments

I agree. If anything in math can be said to mean “X is composable” I would say that that statement is “X is the arrows of a category”.
Maybe.

I'd say there are many different notions of composability. It's partially a matter of taste to elevate one of them to be The One and Only Composability.

But only partially. Partially there are also somewhat objective notions, or at least notions shared between different subjects, of why one thing is more properly composable than another.

Eg it's pretty uncontroversial to say that a program build out of functions composes 'better' than one build from loops and mutable variables.

From a wider point of view the problem with monad composability is exactly that they require a special kind of composability on their elements (join or bind), which makes them less composable with each other.