jimn
08/02/2021, 1:32 AMval foo by delegate::foo or inline val foo get()=delegate.foo
I know which one shows up in the icicle graph like a bag of cinder blocksYoussef Shoaib [MOD]
08/02/2021, 1:55 AMdelegate.foojimn
08/02/2021, 1:58 AMYoussef Shoaib [MOD]
08/02/2021, 4:15 AM:: is more performant than () . In fact, usually it isn't unless you're calling an inline function with :: as a lambda argument. I think most Kotlin devs immediately recognise :: as a sign that there isn't huge performance optimisations done to said code because (in some cases) :: can result in a function reference which uses costly reflection.jimn
08/02/2021, 4:23 AMephemient
08/02/2021, 5:22 AMephemient
08/02/2021, 5:22 AMby :: will necessarily involve more machineryudalov
val foo by delegate::foo will almost literally mean val foo get() = delegate.foo.
https://youtrack.jetbrains.com/issue/KT-39054jimn
08/04/2021, 1:28 AM