by kibwen · 10y ago · 0 comments
> One of the silly things about member functions is the
> effect that they have on argument ordering when ordering
> is not supposed to matter.
This isn't a problem with member functions, free functions have this problem as well. And not just in C++, commutativity just isn't a first-class concept in any programming language that I've ever seen.I believe this is also the entire reason that recent C++ standards introduced free-function forms of things like begin(thing)/end(thing)/etc. because it was just too hard for something like a template to operate on a value when it couldn't tell whether or not object syntax would work.