On 19 July 2013 15:48, Sebastian Tleye <[email protected]> wrote: > > > > 2013/7/19 Igor Stasenko <[email protected]> >> >> I just stumbled upon this: >> >> Announcer subclass: #TxEditor >> .... >> >> This is just plain wrong, as wrong as: >> >> Shampoo subclass: #Shower >> >> because every time you treat inheritance as something else as >> _specialization_ you doing it wrong. >> Inheritance is not about importing needed functionality, it should be >> about specialization and only about it: > > > Completely agree! > If you inherit only because of reuse functionality, use traits instead :-) >
Well, traits, i think, belong more to concern-oriented designs: when you wanna put handle concern in two (or more) different classes, which belong to different inheritance hierarchies. Else, this is just a poor-man's multiple inheritance. -- Best regards, Igor Stasenko.
