News for hackers. Stuff that matters.
Re:Project Valhalla: A look inside Java's epic refactor by brundolf on Sunday December 03, 2023 @02:06AM (#38505424)
To what degree do these features translate to JVM changes, vs just Java language changes (I know the two are fairly tightly coupled)? Eg will this mean new bytecode/optimizations that could be used to optimize other JVM languages which already have similar features?
Re:Project Valhalla: A look inside Java's epic refactor by quantumwoke on Sunday December 03, 2023 @02:20AM (#38505472)
Yes, you can read more about the JVM changes in this blog post: https://openjdk.org/projects/valhalla/design-notes/state-of-...
Re:Project Valhalla: A look inside Java's epic refactor by brundolf on Sunday December 03, 2023 @02:28AM (#38505502)
Nice. So for example, it looks like Kotlin already has a nearly identical feature at the language level, which will be optimizable when Valhalla ships: https://github.com/Kotlin/KEEP/blob/master/notes/value-class...

> In the future, in a Valhalla-capable JVM, JVM primitive classes will enable efficient representation of Kotlin value classes with an arbitrary number of underlying fields on JVM.

Re:Project Valhalla: A look inside Java's epic refactor by pjmlp on Sunday December 03, 2023 @03:37AM (#38505724)
Except it will mean that the semantics will be observable between JVM, ART, and all remaining Kotlin targets.