r/java • • Jan 06 '26

One step closer to Value Classes!

https://mail.openjdk.org/pipermail/porters-dev/2026-January/000844.html
182 Upvotes

118 comments sorted by

View all comments

Show parent comment

1

u/StarsInTears May 17 '26

Sorry for the necropost, but is there a plan for real structs in Java then? I got excited after reading multiple posts calling Value Classes as Structs. It's disappointing if that's not the case, I wonder why is there so much misinformation about this then.

1

u/koflerdavid May 17 '26

The reason why many people think it's structs is because it's a straightforward way to explain it. But it evidently also causes confusion about what Valhalla is actually bringing on the table. I feel that Java's language designers are hesitant regarding features that are about improving performance first and foremost, as they usually cause issues down the line. Best example: primitive data types, which caused a jarring divide in the type system that Valhalla also aims to overcome.