JEP 401: Value Objects (Preview) merged to OpenJDK master

234 points · 157 comments on HN · read original →

Points and comments are a snapshot, not live.

JEP 401 Value Objects (Preview) merged into OpenJDK master after years of work.

This pull request implements the first preview of JEP 401: Value Objects, along with JEP 539: Strict Field Initialization in the JVM (Preview). The change merges 2934 commits from the valhalla/lworld branch into jdk/master. Review was split across sub-reviews for the Java language compiler, JVM, and standard library implementations. The work was primarily done by Oracle engineers, with 14 reviewers and over 50 contributors.

What commenters are saying

Commenters largely praised the long-term discipline and professionalism behind the Valhalla project, with many noting Oracle's sustained investment. The massive 2934-commit PR sparked discussion about OpenJDK's squash-merge workflow and whether incremental delivery could have been used. Some expressed concern about Integer losing object identity, while others explained that years of warning were given and that the change improves memory alignment and performance. Technical debate covered the 63-bit atomicity limitation for flattened references, tearability opt-in, and comparisons to .NET's value types.