4 ms·
> is so firmly rooted in math jargon that it's basically incomprehensible to someone used to thinking in C++. It's firmly rooted in like 5th grade math. Every
by freyrs3 13y ago
> is so firmly rooted in math jargon that it's basically incomprehensible to someone used to thinking in C++.
It's firmly rooted in like 5th grade math. Every child in the US that takes basic algebra in school learns about identities and identity rules like "0+x=x" or "1*x=x" or in pseudocode as something like "(id `op` elem)=elem".
- shock-value 13y agoEvery child certainly doesn't learn the term "monoid" though. The issue here isn't the concept; it's the terminology. Possibly, C++ should adopt the name anyway, but it's by no means a commonly used or understood term by most users of C++. As has been mentioned, C++ is above all a language whose design is driven by pragmatism, so if another more common term can be found for the idea of a monoid you can bet it'll be preferred (even at the expense of some literary accuracy).