r/java • • Aug 25 '26

Value Classes Still Need Compiler Sympathy

https://johan-sjolen.github.io/post/compiler-sympathy/compiler-sympathy/
88 Upvotes

65 comments sorted by

View all comments

Show parent comment

10

u/davidalayachew Aug 25 '26

I admire OpenJDK development team, but most of their talks paint a perfect world, which is not the case.

At the moment, Valhalla is not "reads like a class, works like an int", far from that. Use of that feature requires looking into what C2 actually generated. Which most won't do.

Didn't they say that that was the end goal?

JEP 401 just hit early access via JDK 28. I'd hardly say we are at the end goal. In fact, I'd say we have just barely reached the start lol.