# JEP-401

Published articles for JEP-401.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Value Classes Still Need Compiler Sympathy

DevFeed: [Value Classes Still Need Compiler Sympathy](<https://devfeed.tech/articles/value-classes-still-need-compiler-sympathy-15126.md>)

Original publisher: [Read original article](<https://inside.java/2026/08/24/value-classes-compiler-sympathy/>)

Author: Johan Sjölén

Published: 2026-08-24T00:00:00Z

Content type: article

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [JDK 28](<https://devfeed.tech/topics/jdk-28.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [jep-401](<https://devfeed.tech/tags/jep-401.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [openjdk](<https://devfeed.tech/tags/openjdk.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [payload](<https://devfeed.tech/tags/payload.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [valhalla](<https://devfeed.tech/tags/valhalla.md>)

### AI overview

This article examines value classes as a preview feature in JDK 28 and explains how giving up object identity can enable JVM optimizations such as flattening and scalarization. It also describes limitations caused by representation changes, abstraction boundaries, mutability, and generic virtual calls.

### Source excerpt

Declaring a value class is first and foremost a semantic decision. It tells our fellow programmers that its instances are defined entirely by their state and do not need identity. That clearer model is valuable in itself! The JVM's additional freedom to optimize how those values are represented is a welcome bonus. C2 can do amazing things with that freedom, but it cannot always recover information hidden behind abstraction boundaries. Profiling and inspecting the generated code remain the best ways to understand what is happening. To get the best results, we may still need to have a little sympathy for the compiler.