Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Java EA Released: JEP 401: Value Classes and Objects (java.net)
44 points by pregnenolone on July 31, 2024 | hide | past | favorite | 6 comments


Although they still have a way to go, and this release isn't representative of the impact this JEP will provide it's going to be interesting to see how performance and memory usage improve as Valhalla progresses.


The previews seem to be into the right direction, it was a missed decision not to adopt the same as other GC enabled languages that predated Java, with value types support, e.g. Cedar, Oberon(-2), Component Pascal, Modula-3, Eiffel, BETA.

Then again, they most likely did not expect all the pivots Oak would take, and how relevant it would turn out to be.


Computing at the time was a lot different. Memory access wasn't the multi-cycle process that it is today. There was also a lot of optimism about getting object oriented operating systems setup that could magic away some of these costs.


In that context, Smalltalk, Self, Newton, are actually good examples of OOP OSes/environments, with influence on Java, also without value types.


They seem pretty close to having a preview ready. It could still be several releases before it's in the JVM proper, but it looks like most stuff is wrapping up.

I can see this having some pretty big impacts. So few of my classes in my day to day require identity so this will really trim down a lot.


Over in /r/java, someone posted an online editor you can try out the new functionality in: https://run.mccue.dev/?release=23&gist=08f81022668c9f3419f67...




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

Search: