The desire for the Elvis operator (null-safe member selection) as a killer feature for terse null-handling echoes through the Java community. It should never be introduced, though, and here’s why.
More about Java 9 – this time: Optional. We’ll see how the new methods ‘stream()’, ‘or()’, and ‘ifPresentOrElse()’ considerably improve its API.
Stephen Colebourne presented his pragmatic approach to using Optional. I argue for a stricter one that gets us further without considerable downsides.
Proposal to implement new casting methods on Java’s Class. They aim to fulfill the need for improved ways to cast which was created by Java 8’s Optional and Stream.
Java has no Elvis operator (or null coalescing operator / null-safe member selection) but with lambda expressions / method references you can roll your own.
A summary of why you can’t serialize Optional and what can be done to deal with that limitation if necessary.
Discussing the reasons for not making Java 8’s new type Optional serializable.
A digest of how Optional was introduced in Java 8, summarizing the many discussions about it and their key points based on the mail archive of JSR-335.
Write intention revealing code with Java 8’s new type Optional and prevent most NPEs. This is not optional!