[cfe-dev] uniform call syntax

Nikola Smiljanic popizdeh at gmail.com
Fri Oct 31 17:37:44 PDT 2014


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.

On Sat, Nov 1, 2014 at 7:08 AM, clang c <walterh95 at yahoo.co.uk> wrote:

> 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
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141101/22d525e5/attachment.html>


More information about the cfe-dev mailing list