3 ms·
> Isn't the whole point of delegation as a language feature to avoid that? Yes but Kotlin delegation is implemented for objects and interfaces, not functions.
by mike_hearn 3y ago
> Isn't the whole point of delegation as a language feature to avoid that?
Yes but Kotlin delegation is implemented for objects and interfaces, not functions. Compose is React inspired so it uses functions with keyword arguments for everything, so if a new keyword argument is used, you have to manually forward it.
> Or it breaks
It can happen for any kind of API upgrade, especially where you can customize large amounts of complex logic. I don't think it's unusually worse for inheritance based designs. Obviously that's predicated on there actually being a design, but that's not a problem unique to Java (e.g. C libs that export non-stable symbols is a perennial issue).