3 ms·
This post does a great job of linking the elements of the mathematical definition of a monoid with their usefulness in code, helping explain why monoids are so
by dkarl 9y ago
This post does a great job of linking the elements of the mathematical definition of a monoid with their usefulness in code, helping explain why monoids are so outstandingly useful in programming. If you've ever wondered why it's monoids that come up over and over again in programming instead of another mathematical abstraction, this article will help.
- tw1010 9y agoI think "outstandingly useful" is a bit strong and I think it polarizes people who are on the fence on whether the concept is practically useful or just formalistic jargon.
- dkarl 9y agoSetting aside relevance to common problem domains, I'd say monoids (as monads) are the most used mathematical abstraction in programming after sets, functions, induction, total orders, and various forms of graphs. That's pretty outstanding, especially given their B-list status in mathematics. There are dozens of explanations of monads on programming blogs and not nearly as many explanations of, say, rings or models or vector spaces.