That's generally how I use lateinit, the way you d...
# android
v
That's generally how I use lateinit, the way you described
👍 4
🙂 1
s
Thank you. I believe it's an anti-pattern to check to see if lateinits have been initialized before using them.
1
v
It makes me think that nullable, mutable properties should be used there
💯 4
p
I had the same debate over implementing cached object as lateInt. Same can be done as nullable. Nullable give you way to express that cache may not be there so you should use safe operator.