News for hackers. Stuff that matters.
Re:New Features in Java 14 by lmm on Wednesday March 04, 2020 @08:31PM (#22490096)
Null is not the problem there, null is the symptom. You see exactly the same problem if the val is a primitive type (which can't ever be null): if you access an Int from a mixed-in trait in an earlier constructor, that Int will be 0. This is a real issue, and one where I think Java has actually made the better design choice (interfaces may contain method implementations and constants but not fields - of course they had the benefit of Scala's experience when making that decision), but it's not about null.

There are no comments on this comment yet.