val table: Map<String, Int>? = null ...
# announcements
m
val table: Map<String, Int>? = null get() { if (field == null) { field = HashMap() } return field }
d
Why not
by lazy { }
?
m
yup
d
Nvm, completely missed the context 😄
It's too early and I haven't had my coffee.
m
No, you were right xP
My point was that one should avoid backing field
d
Yes, but I missed the fact you were referring to someone else.
m
👍
f
thank you @marcinmoskala !