Programming and Software Development

Kotlin 2.5.0 Introduces Full Value Classes in Experimental Phase

JetBrains has launched the Full Value Classes feature in Kotlin 2.5.0, enabling developers to build immutable data structures with performance improvements and compatibility with Java's Project Valhalla.

2026-12-02
2 min read
45 views
certi.news Editorial Team
Kotlin 2.5.0 Introduces Full Value Classes in Experimental Phase

A New Phase in Data-Oriented Programming

JetBrains has announced the launch of Full Value Classes in Kotlin 2.5.0, a strategic move aimed at enhancing data-oriented programming and facilitating the handling of immutability. This feature is currently in the Alpha stage, allowing the technical community to test it and provide feedback before the final design is adopted.

What Distinguishes Full Value Classes?

Value classes differ from traditional Data Classes in that they rely entirely on their primary properties, with strict constraints preventing the existence of properties with external backing fields. Key features include:

  • Compatibility with Project Valhalla: Starting from JDK 28, Kotlin value classes can be compiled to align with JVM value classes, opening the door for significant performance gains.
  • Multiplatform Support: The feature is available across all Kotlin platforms, not just the JVM, with future plans to optimize performance for Native, JavaScript, and WebAssembly.
  • Removal of Automatic Functions: The feature does not automatically generate copy() or componentN() functions, relying instead on name-based destructuring, with expectations to add convenient update features in Kotlin 2.6.0.

Why Does This News Matter to Developers?

This feature is a response to modern trends in software development, as immutable data contributes to significantly reducing concurrency bugs. For developers, this means writing more concise code with stronger safety guarantees. JetBrains also provides migration tools for existing libraries via the @WillBecomeValue annotation, helping developers prepare for upcoming software changes.

Important Considerations

It should be noted that this feature is still in the experimental (Alpha) stage, which means there is a possibility of breaking design changes. JetBrains recommends using it only in experimental projects for the time being. It was also confirmed that inline value classes remain supported and stable, with the use of the 'inline' keyword unified across all platforms starting from version 2.5.20.

News source
JetBrains Blog
Open original source ↗
c
Author

certi.news Editorial Team

In the same category

You may also like

View all news