https://openjdk.org/jeps/401好像还不是完全一回事?
Non-Goals
It is not a goal to introduce a struct feature in the Java language. Java continues to operate on just two kinds of data: primitives and objects.
It is not a goal to change the treatment of primitive types. Primitive types behave like value classes in many ways, but are a distinct concept. A separate JEP will provide enhancements to make primitive types more class-like and compatible with generics.
It is not a goal to guarantee any particular optimization strategy or memory layout. This JEP enables many potential optimizations; only some will be implemented initially. Future JEPs will pursue optimizations related to null exclusion and generic specialization.
【 在 oldwatch 的大作中提到: 】
: Valhalla
:
https://openjdk.org/projects/valhalla/:
--
FROM 120.245.130.*