Records -- current status

Guy Steele guy.steele at oracle.com
Tue Mar 20 15:29:23 UTC 2018


> On Mar 20, 2018, at 10:15 AM, Brian Goetz <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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180320/d55c04cc/attachment.html>


More information about the amber-spec-experts mailing list