Jake Zimmerman (3) [Avatar] Offline
#1
So far, it doesn't seem like you plan to include anything about the first class delegation feature using "by". I would very much like to see this in your book, since it's in my top 3 favorite features.
Dmitry Jemerov (39) [Avatar] Offline
#2
Thanks for your feedback!

The delegation feature as it exists in Kotlin 1.0 is very limited, and is applicable only in a narrow number of usecases, so we found it hard to come up with a compelling example and story explaining why it is useful. It's likely that the feature will be improved in future versions of Kotlin, and then we'll be happy to describe it in an update to the book or in separately available online documentation.
Jake Zimmerman (3) [Avatar] Offline
#3
What kinds of limitations? The only thing I've noticed is the fact that the delegate needs to be declared in the primary constructor.
Dmitry Jemerov (39) [Avatar] Offline
#4
For example, there's no way to extend the behavior of a method that you delegate to the base interface: https://youtrack.jetbrains.com/issue/KT-2860
Jake Zimmerman (3) [Avatar] Offline
#5
It's plenty possible. Check out my comment on the linked issue.