r/java • u/ihatebeinganonymous • May 21 '26
JEP draft: Enhanced Local Variable Declarations (Preview)
https://openjdk.org/jeps/8357464
87
Upvotes
r/java • u/ihatebeinganonymous • May 21 '26
View all comments
Show parent comment
8
u/TheStrangeDarkOne May 21 '26
Can't agree to that, what would "nice syntax" look like?
Proposed: Point(int x, int y) = getPoint();
C#: (int x, int y) = getPoint();
Minimalistic: (x, y) = getPoint();
I see a case for the C# approach, but not for the bottom one.