HeadlinesBriefing favicon HeadlinesBriefing.com

Valhalla Value Types Land in JDK 28 After Ten Years

Hacker News •
×

Oracle engineer Lois Foltan confirmed on June 15 that JEP 401—Value Classes and Objects—has been merged into the main OpenJDK tree and targets JDK 28. The pull request adds over 197 k lines across 1,816 files, prompting committers to pause larger changes while the preview integration proceeds, albeit disabled by default.

The effort tackles Java’s historic reliance on reference types. By allowing developers to write regular classes that the JVM stores as dense, primitive‑like values, Valhalla removes pointer indirection and object‑header overhead that cripple cache locality. Brian Goetz notes this is only the first phase, so skeptics may now argue the most critical piece remains pending.

Since the project’s 2014 inception, multiple prototypes—“Q World” and later “L World”—have refined the approach, ultimately sharing the existing reference descriptor to avoid type‑system bloat. The upcoming preview lets engineers experiment with flat, immutable data structures without sacrificing readability, offering a practical path toward the long‑desired alignment of Java’s programming model with modern hardware performance.