Hi! Is there a reason the stdlib doesn't have thes...
# stdlib
l
Hi! Is there a reason the stdlib doesn't have these 2 extension functions to delegate a property from another one?
Copy code
inline operator fun <R> KProperty0<R>.getValue(thisRef: Any?, property: KProperty<*>): R = get()
inline operator fun <R> KMutableProperty0<R>.setValue(thisRef: Any?, property: KProperty<*>, value: R) {
    set(value)
}
Here's a link to an example snippet: https://pl.kotl.in/HyLn42KaQ
i
Why we have not decided yet is because delegation to a property reference is highly related to delegation to a function reference and there are two competing proposals what the latter could mean: https://youtrack.jetbrains.com/issue/KT-8216 https://youtrack.jetbrains.com/issue/KT-23396
l
I'm not sure I understand why these two issues you linked last would prevent KT-8658 to make it into the stdlib as intrinsic. I mean while they are related, I don't think they block KT-8658 from being implemented. Am I right?