uniform call syntax

Could anyone who knows Clang comment how hard it would be to implement this (where would one start…) the desired feature is the ability for a method call a.f(b) to fall back to any suitable free-function f(a,b), for reasons explained in the first paper.
Has anyone tried to implement this already?

With this you don’t have to choose between the superior decoupling of free functions & the superior autocomplete/function chaining of methods. Having to make this arbitrary choice is C++'s biggest frustration for me

http://isocpp.org/files/papers/N4165.pdf

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf

I’d start with the failure (diagnostic) when you try to do this right now. My guess is that name lookup will fail during CXXMemberCallExpr construction. You’d have to perform the lookup in some other context (global or some of the parent contexts) or implement new lookup type. I think you’ll also have to modify overload resolution to “inject” the first argument into the method/function call.

This is just of the top of my head, I’m sure you’ll get better answers from more experienced people.