Hacker News new | past | comments | ask | show | jobs | submit login

That draft is approaching 10 years old now. Has there been any indication of progress on this front in the recent JDK versions?

The kotlin workaround hacks are clever but also nasty and having real VM support for this would be great. But it also is starting to seem like the type of issue that just won't ever be fixed, despite how hugely important it is for performance.




It takes time to make such a fundamental, but backwards compatible change for 10 million developers... Nobody wants Python 2 -> 3...


It's a new keyword & bytecode feature, so there's no backwards compatible risks to it. Nobody's existing code would be impacted as nobody's existing code is using user-defined value types in the byte code.

It looks like there were some experiments and prototyping out of Valhalla from 2014-2018 (including a publicly available build: https://jaxenter.com/java-value-type-163446.html ), but there doesn't seem to be any updates since then



> there doesn't seem to be any updates since then

Oracle (Brian Goetz in particular) regularly gives talks and interviews and publishes updates.

There was even a link on this site a couple weeks ago: https://news.ycombinator.com/item?id=28364500


They don't want to introduce the a third type (next to primitive types and reference types). They are unifying the type system so that after this change we will also get universal generics so that List<T> could be List<int>, List<Person> and also List<Person.val> (where Person.val is an inlined class without identity).


But introducing such a large scale change to the JVM has to be well thought out, especially when it will get to live for decades.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: