override(T)

Lionello Lunesu lio at lunesu.remove.com
Thu Sep 24 08:55:57 PDT 2009


Daniel Keep wrote:
> 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.

I actually like Andrei's suggestion a lot more! It's far more natural:
try reading both versions out loud.

Making it look like C# has bad sides too. Explicit overriding in C#
always hides the member from the public view. So this "like C#" can
easily backfire.

++andreis_suggestion;

L.



More information about the Digitalmars-d mailing list