On Tue, 30 Jun 2026 12:16:40 GMT, Chen Liang <[email protected]> wrote:
>> Defining a value object as an instance of non-abstract value classes works >> here, it's similar to the wording in the changes for the JLS. > > I would prefer to phrase it like "the class of a value object is a value > class", more in line with code like `o.getClass().isValue()`. > > However, Valhalla models "identity" as the extra thing, so I guess it is > better to go like "An identity object is an object whose class is an identity > class or an array type. All other objects are value objects." I would prefer to keep this sentence as proposed as it keeps it consistent with the JLS and keeps the ordering that the terms are introduces consistent with the first sentence. I would be a bit wary of "All other objects are value objects" as it hints that there are other things that are also value classes. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2588#discussion_r3498758369
