Proposal: Syntactic Sugar for Disambiguating Conflicting Trait Methods

I'm also thinking of x.<Trait>::method() (yes I know it's mentioned before). It (or current syntax) can coexist with my flavor (x for Trait).method() since both have their advantages(?)

give()
    .me()
    .a()
    .foo()
    .<Trait>::method();

It has a syntactical advantage that doesn't have this problem:


There's a reasonably significant difference, two most obvious of which is that it's naturally read from left to right and auto-deref semantics work.


Edit:

Looks like OP has already started an RFC.

Posting a link to the RFC saves readers' time looking for the follow-ups of the Pre-RFC.

1 Like