Updated State of Valhalla documents

Dan Smith daniel.smith at oracle.com
Wed Jan 5 23:37:09 UTC 2022


> On Dec 23, 2021, at 12:58 PM, forax at univ-mlv.fr wrote:
> 
> But for Java, i would argue that the model is more
> we have either reference objects or primitives, for reference objects you have those with identity and those without identity,
> hence "primitive" being a top-level kind while "value" (or a better term) being a modifier. 

I don't want to get too in the weeds on syntax (even though, yes, it does help convey the underlying model!). The change you propose is, indeed, a possibility that is still on the table.

But: it's really important to understand that, in the proposed model, primitive values, identity objects, and value objects *all* belong to classes. That's where they get their members, via the normal rules about class membership. A primitive value is an instance of a class, even though it is not an object.

Whether we use the syntax 'c l a s s' in the primitive declaration, the thing being declared is a class. Just like the thing being declared with 'e n u m' is a class.


More information about the valhalla-spec-observers mailing list