3 ms·
Inheritance can be clean and expressive when used diligently. If you wish to express a tight cohesion between classes with default functionality (especially whe
by noema 6y ago
Inheritance can be clean and expressive when used diligently. If you wish to express a tight cohesion between classes with default functionality (especially when it pertains to instance variables), an abstract parent class can keep the shared logic in a single place. I run into this often when dealing with Android UI code which tends to involve many "variations on a theme" classes.