actually i would use `notNull()` delegate for just...
# announcements
d
actually i would use
notNull()
delegate for just marking property as non null instead of lateinit.
lateinit
is rather a hack that exposes public field for easier dependency injection via frameworks such as Dagger, Spring etc.
p
deviant: what's wrong with lateinit? I think not null is just the because lateinit was not when it was added to the stdlib
d
they are different though. as i said
lateinit
exposes public field, so it can be acsessible from java directly. on the other hand
notNull
generates some little overhead, because it is a property delegate. also
notNull
allows you to use
val
, that can be useful sometimes