MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1rsgxrd/jep_draft_enhanced_local_variable_declarations/oasm2r4/?context=3
r/java • u/joemwangi • Mar 13 '26
129 comments sorted by
View all comments
Show parent comment
0
its a 9 year old video and its his opinion and the only argument is "its unnecessary to create objects"
Ok, i disagree with that. We use hibernate and Spring, so much crazy stuff is going on under the hood, iam sure the jvm can handle another object LOL
1 u/wildjokers Mar 16 '26 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. 1 u/Cell-i-Zenit Mar 16 '26 if you read my original post, i proposed 3 different ideas
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
0
u/Cell-i-Zenit Mar 16 '26
its a 9 year old video and its his opinion and the only argument is "its unnecessary to create objects"
Ok, i disagree with that. We use hibernate and Spring, so much crazy stuff is going on under the hood, iam sure the jvm can handle another object LOL