|
|
|
|
|
by a_strange_guy
5643 days ago
|
|
What I still don't get is why inheritance in OO-languages is always the heavyweight version, namely subclassing. Imho every class definition in Java-like OO languages should create two types: A (by default) public interface and a (by default) private class. When you want to inherit from something you should then be able to choose if you want to inherit only the interface or inherit from the full class. Every good design already separates interface from implementation, so why isn't it enforced at the object system layer? |
|