3 ms·
I think another vital part of describing the Haskelly abstraction type is the existence of laws. It's not just that an object fits an interface but further that
by tel 13y ago
I think another vital part of describing the Haskelly abstraction type is the existence of laws. It's not just that an object fits an interface but further that some non-trivial amount of its behavior is specified by the laws that constrain it.
That might seem to not be a huge deal, but mathematicians are aware and programmers should become increasingly aware that good choices of constraining laws allow for both massive expressivity while also having enormous capability for anticipation and introspection. My favorite example is the preponderance of groups showing their large variety coupled with the intense, sophisticated structure unveiled during the Moonshine project which attempted to categorize all the kinds of groups that can be derived just from their core, law-fixed properties.
That's why the monad laws are so important. They extend the tiny, simple interface into a robust method of reasoning that cannot leak in so far as the precise promises it makes... The promises derivable from its laws.
(Unless you don't have a "real" monad)