3 ms·
The thing I realized, that may not be obvious, is that this allows for a “real” Optional type in Java, where the Option itself can not be null. This will allow
by bluejekyll 8y ago
The thing I realized, that may not be obvious, is that this allows for a “real” Optional type in Java, where the Option itself can not be null. This will allow us to remove bare null usage from existing and future Java codebases, without the annoyance of checking if the Option itself is null.
I hope that there will be a compiler flag at some point to enable a warning or compiler failure on any bare null usage.
- pjmlp 8y agoThat is the plan. In a few of Java Language Summit talks, they mention about such cases.
- he0001 8y agoHow does that work in the case of fex Map<String,Optional<String>>?
- pjmlp 8y agoIn the new world of Java value types, generics will support specialization for them. "Adventures in Parametric Polymorphism" from Brian Goetz at JVM Language Summit 2016. http://www.oracle.com/technetwork/java/javase/community/jlssessions-2016-3114175.html http://www.oracle.com/technetwork/java/javase/community/jlss...