| ▲ | metanonsense 4 days 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. |
|
| ▲ | frumplestlatz 4 days ago | parent | next [-] |
| Those three laws are the mathematical definition. Yes, they’re encoded in Haskell, but they’re the same monad laws from category theory. |
| |
| ▲ | charcircuit 4 days ago | parent [-] | | Haskell doesn't encode them. And other concepts can be given a mathematical definition if someone wanted to formalize them. | | |
| ▲ | frumplestlatz 4 days ago | parent | next [-] | | That is pedantry. As for the other concepts, formalizations of OO have been done — generally to support formal verification of OO languages. They are incredibly complicated, comprising papers of tens to hundreds of pages, and either extremely language specific, usually only formalizing a portion of the full language, or general but too limited to specify the behavior of real world languages. The two are not comparable. I’m also not aware of any general formalization of MVC or how one would even begin to approach a canonical definition, much less formalization. | | |
| ▲ | charcircuit 4 days ago | parent [-] | | >I’m also not aware of any general formalization of MVC or how one would even begin to approach a canonical definition You define it by defining Model, View, and Controller and how they interact with each other. For example take a look at the diagram from the article. | | |
| |
| ▲ | antonvs 4 days ago | parent | prev [-] | | > other concepts can be given a mathematical definition if someone wanted to formalize them. There's really no comparison. Monads have a very small and simple definition. That's not true of either OOP or MVC. Formalizations of OOP do exist - they're complex and messy and mainly serve to demonstrate how poorly motivated classic OOP is. | | |
| ▲ | charcircuit 4 days ago | parent [-] | | >they're complex and messy Ultimately they are expressed in code by either the compiler or a framework. If you just want a high level formalization I don't think it would be that complex or messy. |
|
|
|
|
| ▲ | antonvs 4 days ago | parent | prev | next [-] |
| > 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 4 days ago | parent | prev [-] |
| Can you cite an example of a competing definition of monads? |