Hello, World! Isn't there a shorter way to do thi...
# announcements
b
Hello, World! Isn't there a shorter way to do this (with
by
)?
Copy code
var parameter: Parameter
        set(value) {
            delegate.parameter = value
        }
        get() = delegate.parameter
m
the property for being writeable or readable is not within the type itself. therefore you'll have to use either a wrapper in a delegate, or do it like you did.
j
yeah something like:
var parameter by delegate
but then you'd have to create the delegate as well, maybe this will inspire you
b
yeah but basically I wanted to delegate only this particular field 🙂 In my case
delegate
is actually already an interface which I don't want to implement fully
😄 true, don't know why I did that
thanks everybody anyway!