Abstract Classes vs Interfaces

Justin Johansson no at spam.com
Wed Jul 7 04:24:15 PDT 2010


Currently I'm struggling with unifying some C++ and Java code with
the idea that I might eventually port it to D2.

C++ people will know that their language supports abstract classes
and multiple inheritance but not interfaces per se (although they
can be hacked as abstract classes with implicit/trivial constructors).

Java people will know that their language also supports abstract
classes and interfaces though not multiple inheritance.

In respect of the support of abstract classes, multiple inheritance
and interfaces, both D1 and D2 are closer to Java than C++.

May I please ask of this group their opinions as to the difference
between abstract classes and interfaces from an axiomatic viewpoint.

Is there a difference axiomatically, semantically or otherwise?

Thanks in advance for all comments,

Justin Johansson


More information about the Digitalmars-d mailing list