Hello all. I'm a beginner trying to learn somethin...
# announcements
f
Hello all. I'm a beginner trying to learn something more advanced that the very basics. I got a question about "by lazy" assignment. Premising that one of the reasons to use a lazy assignment is to avoid making a val or var nullable in case you can't assign it a value right there right now (there are other reasons to defer it; but this is a common one). That being said, is it possible to lazily assign something which may actually return null to a nullable variable? Hope the question is clear. Thanks!
p
I think the main reason to use
by lazy {}
is to compute something only if it is requested and only once.