Records -- current status
Remi Forax
forax at univ-mlv.fr
Tue Mar 20 16:10:02 UTC 2018
> De: "Guy Steele" <guy.steele at oracle.com>
> À: "Brian Goetz" <brian.goetz at oracle.com>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Envoyé: Mardi 20 Mars 2018 16:29:23
> Objet: Re: Records -- current status
>> On Mar 20, 2018, at 10:15 AM, Brian Goetz < [ mailto:brian.goetz at oracle.com |
>> brian.goetz at oracle.com ] > wrote:
>>> So add all this up and we have three kind of finalness for fields:
>>> - by default mutable, but you can change it
>>> - by default final, and you can't change it
>>> - (and now) by default final, but you can change it
>>> This seems like quite a bad situation to me.
>> I think what you are really saying here is: if you want immutable records, wait
>> for value records, don't try to cram them in early? Then a record inherits the
>> finality of the class kind that it is describing. And same with field
>> accessibility.
> On its face, that sounds right to me.
> I wish “value" could be the default for records, just as I wish “final" had been
> the default all along for all fields and local variables. They’re the same
> issue. But that’s not our history, so we have to live with it.
I'me afraid that users will select value records to have immutability to after discover that they have lost the identity property.
== between a value type and something else return false.
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180320/bb3076a7/attachment-0001.html>
More information about the amber-spec-experts
mailing list