A question about mutability and nullability: why c...
# announcements
v
A question about mutability and nullability: why can't I
lateinit
a
val
? To me that seems the most useful use of
lateinit
would be in dependency injection of services. But once injected, there is no reason why my, for instance, userService should ever been changed - it should be immutable. But I can't lateinit a val - so it has to be a
var
, i.e. mutable.