Need encouraging...

Janice Caron caron800 at googlemail.com
Fri Oct 5 01:23:06 PDT 2007


On 10/5/07, James Dennett <jdennett at acm.org> wrote:
> > C++ can *mimic* interfaces with
> > abstract classes that have no implementation,

It's the other way round. Interfaces mimic abstract classes - but
incompletely. Interfaces allow a workaround for the lack of multiple
inheritance, but C++ classes are without doubt the more fully featured
of the two.

Saying that C++ does not have D interfaces merely because the compiler
does not complain when you provide implementations, is like saying D
does not support C structs because the compiler does not complain when
you provide member functions.

Saying that C++ mimics interfaces because C++ can do more, is like
saying D templates *mimic* C++ templates, because D can do more.

See, what you've done there is you've taken a limitation and called it
a feature.



More information about the Digitalmars-d mailing list