Walter:

> What is dangerous is (in C++) the 
> ability to override a non-virtual function, and the use of non-virtual 
> destructors.

There is something left that I'd like to see D care more about, method hiding:


class Foo {
    string name = "c1";
    static void foo() {}
}
class Bar : Foo {
    string name = "c2";
    static void foo() {} // silent method hiding
}
void main() {}


Here I'd like D to *require* the use of a "new" keyword as C# does:

class Foo {
    string name = "c1";
    static void foo() {}
}
class Bar : Foo {
    string name = "c2";
    static new void foo() {} // method hiding is now visible
}
void main() {}

Bye,
bearophile

Reply via email to