On Monday, 18 June 2018 at 19:31:39 UTC, Steven Schveighoffer
wrote:
In other words, if UFCS meant that module-level symbols took
precedent over local symbols, then it's backwards in terms of
which place usually wins. Generally it's the local symbols.
Ah, you mean it would have to be that way to prevent breakage. No
I would not want it that way.
[...]
But one thing I will note, is that this is valid today:
void bar(int) {writeln("module");}
void main() {
static void bar(int) {writeln("local");}
int x;
x.bar; // "module"
}
Adding UFCS support to locals, which one would be the expected
call? It's difficult to imagine the local being the lower
priority, but it would have to be that way to avoid code
breakage.
Thanks, that clarifies it. No turtles for UFCS.