What we have lost ?
Brian Goetz
brian.goetz at oracle.com
Wed Sep 7 21:56:03 UTC 2022
>
> (I think the idea of "class for which there is no ref type" is a
> non-starter; for all of the types you talk about (vectors, etc),
> you could make the same argument for `int`, but no one is saying
> we don't need `Integer`. I think what you are really getting at
> here is coming back to some form of "I want val-default".)
>
>
> There are types which should never be null for different reasons, for
> those types having a reference projection is an issue.
> A nullable int is something useful hence we need Integer, sadly not
> all the value types are like this.
Yes, they are. If you ever want to call a method reflectively on a
value object, you have to pass it to Method::invoke, which takes an
Object. That's a reference type.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-observers/attachments/20220907/7c6ce709/attachment-0001.htm>
More information about the valhalla-spec-observers
mailing list