KindRoacher
07/22/2019, 11:40 PMlateinit
keyword when one could just assign a null to an object and force NPE using !! operator? If lateinit
object is not initialized, it will throw exception just the way null object would throw NPE. I don't understand what's the real benefit of using lateinit
keyword beside not having perform null checks either using safe calls or double bang operators?