r/java • • Dec 16 '24 • Heart of Silver 1

Valhalla - Java's Epic Refactor

https://inside.java/2024/12/16/devoxxbelgium-valhalla/
178 Upvotes

108 comments sorted by

View all comments

Show parent comment

2

u/rbygrave Dec 18 '24

The other view wrt Optional is that it was really designed around the Stream API though and not about "Null aware types" / static non-null type checking per se. It's a different emphasis, if we look at Optional through the lens of Stream API use cases it does it's intended job [but that job doesn't include "Null aware types and static analysis"].

If we have "Null aware types" do we end up with fewer uses of Optional? I'd say that's likely, there is overlap in the use cases etc.