"Andrei Alexandrescu" <[email protected]> wrote in message news:[email protected]... > Ary Borenszweig wrote: >> >> Umm... so it defines a body that will never be used because that class >> can't be instantiated and the method must be redefined by subclasses? >> Isn't that the same as "doesn't provide a body"? > > import std.stdio; > > class A { > abstract void fun() { writeln("wyda"); } > } > > > class B : A { > void fun() { A.fun(); } > } > > unittest { > A a = new B; > a.fun(); > a.A.fun(); > } >
Not a rhetorical or a loaded question: Has that sort of thing ever been useful?
