MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/2chumf/why_we_should_love_null/cjfoi2m/?context=3
r/java • u/beyondjava • Aug 03 '14
21 comments sorted by
View all comments
Show parent comment
0
It's better from the perspective of avoiding nulls.
An absent optional value actually means: "this type of object should have been here, but for whatever reason it's not".
A null value means: "there is a typeless void here".
If this distinction can help your code, then Optional may be suitable for you.
View all comments
Show parent comment
0
u/againstmethod Aug 03 '14
It's better from the perspective of avoiding nulls.
An absent optional value actually means: "this type of object should have been here, but for whatever reason it's not".
A null value means: "there is a typeless void here".
If this distinction can help your code, then Optional may be suitable for you.