Value objects would be distinguished only by their field values, not by identity, providing an easier programming model for simple values. Credit: Pablo Merchán Montes An OpenJDK proposal would preview value classes and objects in a forthcoming version of Java. The feature would provide Java class instances that have only final fields and lack object identity. The Java enhancement proposal, which dates back to August 2020, was updated on June 21. The plan would allow developers to opt into a programming model for simple values in which objects are distinguished by their field values, much as the int value 3 is distinguished from the int value 4. A second goal is to migrate popular classes that represent simple values in the JDK, such as Integer, to this programming model. This is intended support compatible migration of user-defined classes. A third goal is to maximize the freedom of the JVM to encode simple values in ways that improve memory footprint, locality, and garbage collection efficiency. The proposal is slotted as a preview language and JVM feature. It currently does not state a targeted version number for Java. It is not a goal of the plan to introduce a struct feature in the Java language. Java would continue to operate on two kinds of data, namely objects and primitives. It also is not a goal to change the treatment of primitive types or to automatically treat existing classes as value classes. Related content analysis Beyond the usual suspects: 5 fresh data science tools to try today The mid-month report includes quick tips for easier Python installation, a new VS Code-like IDE just for Python and R users, and five newer data science tools you won't want to miss. By Serdar Yegulalp Jul 12, 2024 2 mins Python Programming Languages Software Development analysis Generative AI won’t fix cloud migration You’ve probably heard how generative AI will solve all cloud migration problems. It’s not that simple. Generative AI could actually make it harder and more costly. By David Linthicum Jul 12, 2024 5 mins Generative AI Artificial Intelligence Cloud Computing news HR professionals trust AI recommendations HireVue survey finds 73% of HR professionals trust AI to make candidate recommendations, while 75% of workers are opposed to AI making hiring decisions. By Paul Krill Jul 11, 2024 3 mins Technology Industry Careers how-to Safety off: Programming in Rust with `unsafe` What does it mean to write unsafe code in Rust, and what can you do (and not do) with the 'unsafe' keyword? The facts may surprise you. By Serdar Yegulalp Jul 11, 2024 8 mins Rust Programming Languages Software Development Resources Videos