3 ms·
I think the use of mathematical names for sufficiently generic concepts in Haskell improves a certain kind of discussion. If we had an interface called "Append
by dllthomas 11y ago
I think the use of mathematical names for sufficiently generic concepts in Haskell improves a certain kind of discussion.
If we had an interface called "Appendable", that leaves room for arguing over the boundaries of what "really" counts as "appending". This is contentious, because interfaces define what we should be able to rely on.
In Haskell, it's entirely clear what is and is not a Semigroup. Does it follow the Semigroup laws? Okay, it's a Semigroup! What can I rely on if I ask for a Semigroup? The Semigroup laws.
Discussion of, say, whether "container" is a good way to think of a "functor" is more quickly recognized as a purely pedagogical question - which doesn't mean it can't be contentious, but doesn't as much get in the way of getting work done.