This post is a free translation of the State of the Values document, suggestions for introducing value types into the JVM, and the Java language itself written by John Rose, Brian Goetz, and Guy Steele, diluted with my thoughts.The details of the proposal for the implementation of value types at the level of bytecode are omitted, which is not very interesting for most Java programmers.
The most important thought: an object (reference) identity is needed only to support the variability of objects.An object can change its state, but by reference we can always verify that it is “the same” object.Therefore, the value types will be strictly immutable.
Suggested uses of value types:
Numbers: complex, unsigned, 128-bit, with a fixed comma, etc. Everything that is not described by the existing primitives.
I know that this blog reads a lot of Oracle employees who follow the mailing lists much more closely and are generally closer to the topic, I will be glad if they make important clarifications.