I think we need something that solves the problem here; (because I do think there’s one, and the isocpp post confirms it in my view).
Free functions are awesome yes; but they are at a disadvantage due to the inability to call them infix with method call syntax, which helps to starve off parenthesis build-up. In my view, free functions are much nicer to work with in a language like Haskell.
The technical complexity budget, or the one for learning the language?
Are you differentiating between mine and @scottmcm’s proposals here or does your argument apply to both, and if so, why?
I think that doesn’t happen all too often (?); when it does, the vec.Vec::sorted(..) syntax can be used – or just going back to calling free functions as they were. Admittedly, it isn’t a silver bullet, but I think it solves more problems in practice.
Sure; but as you know, that also limits the usefulness severely. For me it becomes a bit “meh” to have it only work for private stuff. Having to write self as the argument is also a new rule that the programmer must learn and the non-public stuff is far from obvious.
The more universal fun(foo, bar) <=> foo.fun(bar) seems like an easier rule to remember to me and has more expressive power and gives the language uniformity from a user’s perspective.
Presumably, this would also allow the user to even call associated functions of traits infix like: recv.Type::bar() or even recv.<Type as Trait>::bar().
(I’ll start calling this the Uniform Method Call Syntax (UMCS))