News for hackers. Stuff that matters.
Re:Java is not a safe language by ImprobableTruth on Monday June 13, 2022 @07:51AM (#31724121)
Null pointer exceptions by far the most frequent exception I encounter. Not only on the development side, but also as a user.

Optional is convention based and @NonNull just throws the runtime exception at a better location, so in my experience neither come remotely close to providing null safety.

Re:Java is not a safe language by kaba0 on Monday June 13, 2022 @05:46PM (#31732207)
@NonNull and similar annotations can and are used by static analyzer programs to completely eliminate null exceptions. For example Checker Framework can do that and much more.

This is the exact same thing that languages with null-safety have “in-built”. Sure, language support is nice, but it is here and is working