Additionnally to hotkey
's good answer, here is how I choose among the two in practice:
lateinit
is for external initialisation: when you need external stuff to initialise your value by calling a method.
e.g. by calling:
private lateinit var value: MyClass
fun init(externalProperties: Any) {
value = somethingThatDependsOn(externalProperties)
}
While lazy
is when it only uses dependencies internal to your object.