override(T)

Daniel Keep daniel.keep.lists at gmail.com
Thu Sep 24 07:47:07 PDT 2009



Andrei Alexandrescu wrote:
> ...
> 
> So I was thinking of this:
> 
> class LotterySimulation : Lottery, Figure {
>     override(Lottery) void draw();
>     override(Figure) void draw();
> }
> 
> This is easy to implement, scales well, and has good real world uses.
> What say you?
> 
> 
> Andrei

Why not go with what C# uses?

class LotterySimulation : Lottery, Figure {
    override void Lottery.draw();
    override void Figure.draw();
}

Just seems like a more obvious and natural place for it to me.  D
already uses this to disambiguate symbols in other places.



More information about the Digitalmars-d mailing list