Abstract functions in child classes

Simen Kjærås simen.kjaras at gmail.com
Thu Dec 1 10:36:09 PST 2011

On Thu, 01 Dec 2011 19:19:49 +0100, Adam <Adam at anizi.com> wrote:

> I can see the case for a grand-child, but if a class does not provide
> a definition for an abstract member, is that class not, by
> association, abstract?

Of course. That's what I said. Or meant, at any rate.

> "Classes become abstract if they are defined within an abstract
> attribute, or if any of the virtual member functions within it are
> declared as abstract."
> I *assume* that by extending Parent, Child inherits the abstract
> function. If inheriting an abstract member transitively makes Child an
> abstract, then I find that the abstract keyword at the class level is
> little more than explicit documentation.

Indeed. But I'm not one to argue that explicit documentation is bad.

More information about the Digitalmars-d-learn mailing list