Rob Elliot
05/16/2024, 9:44 AMPropertyDelegateProvider it's just to capture the name of the property)Rob Elliot
05/16/2024, 10:07 AMYoussef Shoaib [MOD]
05/16/2024, 11:51 AMMap already provides a getValue that does exactly that btw. But yes you can do thatRob Elliot
05/16/2024, 11:58 AMYoussef Shoaib [MOD]
05/16/2024, 12:01 PMReadOnlyProperty, to instead do something like:
@JvmInline value class Wrapper<T>(val value: T)
inline operator fun <T> Wrapper<T>.getValue(...): T = valueRob Elliot
05/16/2024, 12:21 PMYoussef Shoaib [MOD]
05/16/2024, 12:22 PMReadOnlyProperty you can just return a Wrapper is what I'm saying. It's a little bit of reduced wrapping, that's allRob Elliot
05/16/2024, 1:00 PMRob Elliot
05/16/2024, 1:18 PMgetValue as well as passPropertyNameTo - but I guess that's the price of the inlining... I think I'll take the hit of the extra object allocations and go with this:Youssef Shoaib [MOD]
05/16/2024, 1:19 PM