Records -- current status

Remi Forax forax at
Tue Mar 20 16:10:02 UTC 2018

> De: "Guy Steele" <guy.steele at>
> À: "Brian Goetz" <brian.goetz at>
> Cc: "amber-spec-experts" <amber-spec-experts at>
> 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 |
>> brian.goetz at ] > 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. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list