News for hackers. Stuff that matters.
Re:A categorized list of all Java and JVM features since JDK... by nitrogen on Thursday April 01, 2021 @02:50PM (#26664548)
Kotlin's approach of making null act kind of like Optional is pretty nice, but I wish there was a strict option for interacting with Java types -- by default, all Java-native types (type names ending with !) can be null and are not null checked at compile time.
Re:A categorized list of all Java and JVM features since JDK... by Larrikin on Thursday April 01, 2021 @07:44PM (#26667653)
In our code base we just throw a `?:` after any type that shows up as Type! and handle it immediately. If you actually expect a null value you can also use `?: null`