Need encouraging...
James Dennett
jdennett at acm.org
Fri Oct 5 06:35:43 PDT 2007
Janice Caron wrote:
> On 10/5/07, James Dennett <jdennett at acm.org> wrote:
>>> C++ can *mimic* interfaces with
>>> abstract classes that have no implementation,
Just to be clear: I did *not* write that. In fact, I refuted
it. Please be careful with attributions!
-- James
> 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