I understand, that in Scala
null is non-idiomatic and should not be used. But this leads to the following question:
Given a class with a member variable which cannot be set within the constructor because the needed information is not available at the time the constructor is executed.
An approach would be
private var foo: Bar = _ which would initialize
null, which, we know, should be avoided.
What is the better way to deal with such a situation?