3 ms·
And you could write an Appendable instance for them as well, it would just fly in the face of what the word "append" means to most people. (Nitpick, of course.)
by srl 13y ago
And you could write an Appendable instance for them as well, it would just fly in the face of what the word "append" means to most people. (Nitpick, of course.)
- dllthomas 13y agoSure, but is that more understandable than using "monoid"?
- chilldream 13y agoDon't know enough to know that the current name is optimal, but at least "Monoid" correctly says to the initiated "you don't understand this yet." "Appendable" lies to you and says "you understand this" even if you don't.
- dllthomas 13y ago"Monoid" also has the advantage of being very searchable. First result on Google (from a private browser window) is the Wikipedia page with the snippet "In abstract algebra, a branch of mathematics, a monoid is an algebraic structure with a single associative binary operation and an identity element". DDG gives similar results, though the Doctor Who aliens are higher up...
- lmm 13y agoYes. If I've got used to the idea that lists are appendable and then someone tells me I can "append" two numbers by adding them and that will fit the interface... yeah, that makes sense. It might be a bit confusing on the way, but better to use a term that covers the most common case than a term that's completely alien.