When would you use a lateinit? I use it for inject...
# android
s
When would you use a lateinit? I use it for injecting dependencies such as presenter, interactor and such to Activities. Someone asked me if we should be checking to see if lateinits have been initialized. I believe that defeats the purpose of making a lateinit because in principle they are guaranteed to be initialized based on your implementation. If there's a crash because of lateinit not being initialized, it means the source of the problem is somewhere else. Would you agree or do you have any extra thoughts?