[D.typesystem] Suggestion for improving OO inheritance models

retard re at tard.com.invalid
Wed Sep 1 09:13:21 PDT 2010


Wed, 01 Sep 2010 23:16:15 +0930, Justin Johansson wrote:

> Whilst one admirable aspiration of D is to make for better
> meta-programming capability in a PL, IMHO one seemingly-lacking
> aspiration of D is in the area of improving OO inheritance models over
> and above that provisioned for in C++ and Java.
> 
> Maybe I'm ill-informed though I'd say that D, C++ and Java more-or-less
> share the same OO inheritance model being that of inheritance/derivation
> by extension as opposed to, say, inheritance/derivation by restriction. 
> (Observation: Java even uses the 'extends' keyword to introduce derived
> classes; this hardly caters for inheritance by restriction).
> 
> May I suggest that a discussion ensure about a taxonomy of OO
> inheritance models, including the notions of inheritance by extension,
> restriction, code refactoring purposes etc. so that D can evolve to a
> position to be able to claim a higher moral plane over C++, Java, et al.

Have you taken a loot at Scala & traits already? It would be a great 
starting point.


More information about the Digitalmars-d mailing list