deviant
03/25/2017, 11:49 AMnotNull()
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.Paul Woitaschek
03/25/2017, 1:12 PMdeviant
03/25/2017, 1:30 PMlateinit
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