Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28
Points and comments are a snapshot, not live.
Project Valhalla's value classes preview in JDK 28 after a decade of work.
On June 15, Oracle engineer Lois Foltan confirmed JEP 401 (Value Classes and Objects) targets JDK 28 preview. The change adds over 197,000 lines across 1,816 files. Valhalla introduces value classes (declared with value modifier) whose instances are objects without identity, aiming for dense memory layout like primitives. The project evolved through several prototypes (Q World, L World) and naming changes from value types to inline classes to primitive classes, before settling on current value classes model. Specialized generics remain a separate future phase.
What commenters are saying
Commenters split on Java's stewardship: some praise the team's careful design evolution, others criticize the decision to drop non-nullable value types as "too mentally heavy," arguing it reduces safety guarantees. .NET is cited as getting value types right earlier due to second-mover advantage and Anders Hejlsberg's influence. A Java team member responds that preferences about language features are rarely universal, and what .NET chose didn't work out well for them, particularly for virtual threads.