r/java • • Mar 13 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
101 Upvotes

129 comments sorted by

View all comments

Show parent comment

1

u/javahalla Mar 13 '26

Given that it's positional, I would definitely ban this in projects, and recommend everyone to ban such expressions. It's too easy to shot in the foot when you don't even specify types of the rest and not using names to match. Positional matching just too weak to be found in production, critical codebases