piątek, 11 grudnia 2015

composition > inheritance

effective Java,
Item 16
Do only things that you want to do. If you mean subclassing you have to be completely sure B means A if B inherits A. If you just want to use some features - compose. If you compose you can feel like composer :)
As written here in "Effective java" there are other libaries used widely that break this rule. But never follow bad path.

Brak komentarzy:

Prześlij komentarz