Kotlin Code Smell 9 - Subclassification for Code Reuse
TL;DR: Always favor composition over inheritance.
Problems
Coupling
Maintainability
Solutions
Composition
Exceptions
If the hierarchy follows the principle of "behaves like," then it is safe.
Sample Code
Wrong
open class Rectangle(
prote...
yonatankarp.com1 min read