top | item 45155984

(no title)

metanonsense | 5 months ago

But isn’t that exactly what GP meant? There is an original, very precise but also very abstract definition (and what is more abstract than category theory). Then people come along who give a different definition that matches the original one in their specific context („three laws in Haskell“). After that people take these three laws and apply them (sometimes overly simplistic) to other contexts („just give it a flatMap in Scala to get a monad“). And at some point the original meaning got lost, and there are competing definitions out.

discuss

order

frumplestlatz|5 months ago

Those three laws are the mathematical definition.

Yes, they’re encoded in Haskell, but they’re the same monad laws from category theory.

charcircuit|5 months ago

Haskell doesn't encode them. And other concepts can be given a mathematical definition if someone wanted to formalize them.

antonvs|5 months ago

> three laws in Haskell

The laws are mathematical ones, that can't be expressed in the Haskell type system.

> And at some point the original meaning got lost

This is false. The original meaning is a mathematical one, and its use in Haskell conforms to that.

That meaning is not "lost", it's the only valid and rigorous definition there is. People who think the meaning is lost are simply ignorant. All they would have to do to correct that ignorance is a minimal amount of research.

antonvs|5 months ago

Can you cite an example of a competing definition of monads?