darkmoon_uk
09/22/2021, 2:56 AMlazy
(and possible other Property Delegation) - the foundation of their argument appears to be that use of reflection in property delegation is too costly for most use cases. Unfortunately they don't give any examples of where the 'tipping point' of complexity lies; where lazy
does become worth it.
This has put my team off from using lazy even for cases where moderately complex objects are being created.
I'm suspect of two things in this talk: firstly their poor choice of example - obviously it's going to be inefficient to use this to allocate an Int
, but what about smaller-to-moderately sized classes? No benchmarks provided or discussion of initial lazy
cost vs. subsequent lazy
where presumably some aspects of any reflection would have become cached.
Thoughts?ephemient
09/22/2021, 3:05 AMephemient
09/22/2021, 3:05 AMjw
09/22/2021, 3:19 AMjw
09/22/2021, 3:19 AMjw
09/22/2021, 3:20 AMdarkmoon_uk
09/22/2021, 3:26 AMInt
example was pretty unhelpful (by their own admission!?).darkmoon_uk
09/22/2021, 3:28 AM"but no the cost has not changed"You mean beside the cases stated in the Kotlin 1.4 release notes, since the 2019 talk?