[OT] local overloading (Was: Re: ADL)
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 5 02:33:53 PDT 2016
On 05.09.2016 02:50, Walter Bright wrote:
> On 9/4/2016 2:36 PM, Timon Gehr wrote:
>> Declare-call ordering issues for overload sets are not limited to
>> local scopes.
>> This problem needs to be solved anyway. The fact that the scope is
>> local adds
>> exactly zero additional complications.
> I know that static if brings with it ordering problems. That's not a
> justification for adding them to statements.
I didn't suggest to do that. The sequence can be:
1. Fix ordering problems for overload sets generically.
2. Allow local overloads.
1. Allow local overloads with some additional restrictions ensuring no
2. Fix ordering problem for overload sets generically.
3. Remove additional restrictions for local overloads.
>>> Besides, I showed a method of how the overloads could be done with the
>>> existing language.
>> That's not the point. What's perhaps more telling is that you
>> initially got it
>> wrong. It /wants/ to be valid code.
> Maybe, but if I redesigned the language for every mistake I made,
> nothing would get done.
The mistake is arguably in the language design here. (Lack of turtles.)
> My point with all this is ADL-workalike behavior can be reasonably done
> with existing D core features available *now* in all 3 compilers. It
> means we don't have to panic and rewrite the compiler right now - Manu
> can use these techniques and get his work done, even though it isn't
> quite what he envisions. He's not dead in the water.
More information about the Digitalmars-d