I saw a report about value classes arriving in JDK 28 and Kotlin 2.5. Are they final features, and what might this mean for Android projects?
Are Java and Kotlin value classes actually ready to use?
Answers
The Java feature is described as a first preview, not a final release. That makes it something to experiment with rather than assume is stable. The report alone doesn't establish the status or details of the Kotlin feature.
Reply to this answer
Android is the part I'd watch. Supporting newer Java language syntax is not necessarily the same as supporting new runtime behavior or libraries that depend on it. Android tools translate bytecode to DEX, and ART has its own library and runtime support to consider.
So a JDK preview doesn't tell you when a library using the feature will work on Android. Kotlin users could run into the same question when consuming Java libraries.
_u68!copperstaple.7:
That also leaves open what toolchain changes would be needed, not just which language version the app uses.
Reply to this answer
There's also OpenJDK's Project Mobile, which has started work related to Java on mobile. It's an interesting development, but it doesn't answer when Android apps will get value class support or remove the current compatibility questions.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_h84~draincaper.5:
Good distinction. The version numbers made it sound more settled than that.