What happened to primitive classes?
Brian Goetz
brian.goetz at oracle.com
Mon May 22 16:37:29 UTC 2023
There's a document on these shifts coming soon.
On 5/22/2023 11:08 AM, Remi Forax wrote:
>
>
> ------------------------------------------------------------------------
>
> *From: *"Julian Waters" <tanksherman27 at gmail.com>
> *To: *"valhalla-dev" <valhalla-dev at openjdk.org>
> *Sent: *Monday, May 22, 2023 4:41:59 PM
> *Subject: *What happened to primitive classes?
>
> Sorry if this is a silly question, but I recently browsed through
> JEP-401 to find that all references to primitive classes have been
> completely scrubbed, as if they were never there at all. I haven't
> been keeping up to date with Valhalla lately, so I can't tell
> what the changes (if any) have been. Did they move elsewhere or
> were they changed to something else?
>
>
> Yes, all values classes are now nullable by default.
> The equivalent of the old primitive class is a non-nullable value
> class with a default instance.
>
> If you declare the value class Range like the first example of the
> JEP-401, Range! (not the '!') is what is the closest to the old
> primitive class.
>
>
> best regards,
> Julian
>
>
> regards,
> Rémi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20230522/01691095/attachment.htm>
More information about the valhalla-dev
mailing list