I'm curious about value classes in Java. Are they still on track for release in Java 25, or have there been any updates or changes to the timeline?
3 Answers
The plans for value classes have definitely shifted, and while they’re settling into a more concrete path, there have been many related features released in small increments. The team is being cautious to avoid breaking legacy code, especially since things like Optional might be impacted. It seems they want to get it right, which I appreciate, but I do wish they would move faster, especially with features like String Templates.
Value classes are part of the Valhalla project. Unfortunately, it seems like they won’t be previewed in Java 26 as hoped. I’ve been keeping an eye on this for a while, and it’s pretty disappointing that things are still up in the air.
Are you referring to records that were introduced in JDK 16, or the features that act like objects but perform as primitive types? If it’s the latter, it doesn’t look likely for JDK 25 or even 26.
Yeah, I meant that second one. Why has it been delayed for so long?
Totally agree. Valhalla has been on the radar for over a decade now! I’ve stopped holding my breath for it to actually roll out.