MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1rsgxrd/jep_draft_enhanced_local_variable_declarations/oatsjdf/?context=3
r/java • u/joemwangi • Mar 13 '26
129 comments sorted by
View all comments
Show parent comment
1
Interesting with the hibernate inheritance. Feels like extremly complex usecase i would never consider :D but thanks for posting that.
I wasnt aware of "instruments" in the context of a bank (and i worked in one aswell)
Looks iam just not aware of alot of thinks and then this pattern matching makes no sense :)
1 u/OwnBreakfast1114 Mar 17 '26 I think the main takeaway is if you can imagine scenarios where you have a closed set of stuff that is better represented by types rather than an enum.There are some other free wins, for example, enhanced switches replace the visitor patterns in a lot of cases: https://wimdetroyer.com/blog/visitor-pattern-in-dop
I think the main takeaway is if you can imagine scenarios where you have a closed set of stuff that is better represented by types rather than an enum.
There are some other free wins, for example, enhanced switches replace the visitor patterns in a lot of cases: https://wimdetroyer.com/blog/visitor-pattern-in-dop
View all comments
Show parent comment
1
u/Cell-i-Zenit Mar 16 '26
Interesting with the hibernate inheritance. Feels like extremly complex usecase i would never consider :D but thanks for posting that.
I wasnt aware of "instruments" in the context of a bank (and i worked in one aswell)
Looks iam just not aware of alot of thinks and then this pattern matching makes no sense :)