| Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28(jvm-weekly.com) | |
| 602 points by philonoist 1 day ago | 379 comments | |
tl;dr: After 12 years of development, JEP 401 (Value Classes and Objects) is landing as a preview in JDK 28, letting developers declare classes without identity so the JVM can scalarize them or flatten them into dense memory layouts—closing the gap between "codes like a class, works like an int." The initial release covers value classes, migration of primitive wrappers like Integer, and cheaper boxing, but notably excludes null-restricted types and specialized generics (so `ArrayList<Point>` still won't be flat). Value objects can still be null, `==` now means substitutability, and `synchronized` on them throws—expect the full payoff only across future releases. | |
HN Discussion:
| |