Is it possible to use the `by` keyword to delegate...
# announcements
a
Is it possible to use the
by
keyword to delegate a property to another object, so instead of:
Copy code
class Foo {
    var bar
        get() = spam.eggs
        set(value) {
            spam.eggs = value
        }

    private val spam = Spam()

    private data class Spam(var eggs: String = "")
}
I could write
var bar by spam.eggs
?