[External] : Re: Updated State of Valhalla documents

forax at univ-mlv.fr forax at univ-mlv.fr
Thu Dec 23 19:58:03 UTC 2021


> From: "John Rose" <john.r.rose at oracle.com>
> To: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "Brian Goetz" <brian.goetz at oracle.com>, "valhalla-spec-experts"
> <valhalla-spec-experts at openjdk.java.net>
> Sent: Thursday, December 23, 2021 8:43:22 PM
> Subject: Re: [External] : Re: Updated State of Valhalla documents

> On 23 Dec 2021, at 11:26, [ mailto:forax at univ-mlv.fr | forax at univ-mlv.fr ]
> wrote:

>> For "value", we know that we want value class and value record, so it's more
>> like a modifier.
>> For primitive, do we want a primitive record ? The VM supports it, but do we
>> want to offer that possibility in Java ?
>> My gut feeling is that the answer is "No" because of what Kevin said earlier, we
>> should drive users to use value classes instead of primitives.
> Good points, though not sure if they carry the decision completely the other
> way. The VM sees primitive as a classfile modifier. (The ACC_PRIMITIVE modifier
> flag!) You are raising the question of whether this is smart for the language
> as well. For further discussion and perhaps experimentation.

This re-join with the discussion about where to cut. 

>From the VM POV, which is interested by the runtime characteristics, 
we have either classical classes or value types and value types can be value class or primitive class. 

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. 

Rémi 


More information about the valhalla-spec-observers mailing list