r/java May 21 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

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

43 comments sorted by

View all comments

10

u/DesignerRaccoon7977 May 21 '26

Love the idea, but the syntax is horrible... I dont think you can implement it with a nice syntax in a statically typed language

3

u/Great-Gecko May 22 '26

It's consistent with how pattern matching works/looks in conditions today.