aliasing base methods

Bill Baxter dnewsgroup at billbaxter.com
Mon Feb 26 14:49:56 PST 2007


Frank Benoit (keinfarbton) wrote:
>>> To the ambiguity issue of the alias:
>>> Override is always/already precise, because it *is* bundled with the
>>> complete method signature.
>> Don't follow you there.
> 
> My point was, that the alias is actually not precise, but the override
> already is.
> 
> If you alias a method, it can be ambiguous, because you do not specify
> which version you want to alias. You would need to extend the syntax to
> make is precise.
> 
> alias Base.fnc fnc;      // all fnc (not precise)
> alias Base.fnc(int) fnc; // exactly this fnc. (precise)
> 
> In the opposite, the override keyword is already precise, because it is
> the method signature.
> 
> override void fnc( float ){ ... }
> 
> No change in syntax needed.

Ok.  I see what you mean now.  But one way or another we're going to 
have to fix the alias mess.  Not being able to alias a particular 
version of an overloaded function is just too much of a gaping hole.

--bb



More information about the Digitalmars-d mailing list