Q-types are dead, long live non-null side attributes

forax at univ-mlv.fr forax at univ-mlv.fr
Sat Jan 21 13:50:43 UTC 2023


> From: "Gernot Neppert" <mcnepp02 at googlemail.com>
> To: "Valhalla Expert Group Observers"
> <valhalla-spec-observers at openjdk.java.net>, "Remi Forax" <forax at univ-mlv.fr>
> Sent: Saturday, January 21, 2023 12:14:50 PM
> Subject: Q-types are dead, long live non-null side attributes

> Hi,

> looks like a great idea to me - which is no wonder because I propsed it back in
> June 2021 already, as this posting proves:

> [
> https://mail.openjdk.org/pipermail/valhalla-spec-observers/2021-June/001527.html
> |
> https://mail.openjdk.org/pipermail/valhalla-spec-observers/2021-June/001527.html
> ]

> In that text, I wrote something very similar to Remi's reasoning:
> "do we really need to have two different type-mirrors corresponding
> to these descriptors?
> Isn't the "Q-ness" rather a property of the Field, method Parameter or
> method return-type, and therefore should be available there via
> reflection as a simple boolean property?"

Hi Gernot, 
there is a subtle difference, what you are describing is a model based on a field/method property while the proposed model goes a step further and also defines the nullability on types. 

This is important because we want to be able to flatten the array of an ArrayList<@Nullable Complex>. Something we can not represent with only a boolean property on fields/methods. 

regards, 
Rémi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-observers/attachments/20230121/a2fc5def/attachment-0001.htm>


More information about the valhalla-spec-observers mailing list