|
|
|
|
|
by _old_dude_
2224 days ago
|
|
This is the most controversial feature of Kotlin. The delegation is better than inheritance because you don't get all the methods from the base class if you don't need them. At my company, we have banned it, because if you add a method to Bar the method is automatically added to Foo which makes the delegation as fragile as the inheritance. |
|
Delegation does not remove the need for interfaces.