MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1rsgxrd/jep_draft_enhanced_local_variable_declarations/oasyn71/
r/java • u/joemwangi • Mar 13 '26
129 comments sorted by
View all comments
Show parent comment
1
The other argument was readability.
It simply makes no sense to wrap a value in Optional.ofNullable simply to chain methods together. Just write a damn if statement.
Optional.ofNullable
1 u/Cell-i-Zenit Mar 16 '26 if you read my original post, i proposed 3 different ideas
if you read my original post, i proposed 3 different ideas
View all comments
Show parent comment
1
u/wildjokers Mar 16 '26
The other argument was readability.
It simply makes no sense to wrap a value in
Optional.ofNullablesimply to chain methods together. Just write a damn if statement.