What is wrong about implementation by delegation?

From the Wrap-up of the article Effective Class Delegation:

implementation by delegation - has been named as the “worst” feature in Kotlin by the lead language designer, Andrey Breslav on several occasions (e.g. during the KotlinConf 2018 closing panel discussion). There are some cases where this kind of delegation can get complicated and produce some… Interesting behaviour.

What problematic cases exist? They are not mentioned in the article or the closing panel discussion.


One of the points is the fact that delegation happens through a hidden field, even if there is an actual field as well. Partial specialisation doesn’t always work well either.

Thank you for your response. What is the issue of two fields (hidden vs. actual)? Can you give an example of partial specialization that is not working?