extends and implements

Dejan Lekic dejan.lekic at gmail.com
Mon Nov 7 11:36:57 PST 2011


Andrej Mitrovic wrote:

> class Rectangle : IShape, Drawable {}
> 
> It's pretty common in other languages, I've seen it used in D as well.

I used the same naming convention for interfaces until I saw this 
presentation: http://www.infoq.com/presentations/It-Is-Possible-to-Do-OOP-
in-Java (jump to 0:42 if you do not want to see this brilliant 
presentation).

In short there is an interface RecentlyUsedList, and Kevin recommends that 
good name for implementation is something like ArrayBasedRecentlyUsedList. 
And he is also against IRecentlyUsedList names... I actually agree with what 
he suggests, and stopped using INames for interfaces. :)

PS. the presentation is not Java advocacy, it contains lots of Java 
criticism...


More information about the Digitalmars-d-learn mailing list