Package Private Record Fields

Brian Goetz brian.goetz at oracle.com
Mon May 4 13:20:41 UTC 2020



> How is this any different then default? 

Because with classes, the user has a chance to say "private" and get it 
right; if records worked this way, no one would ever have a chance to 
get it right.  So this would be a poor language design choice, because 
it would make what was a questionable default into a questionable 
permanent reality.

I agree that the default accessibility for classes was ill-chosen, but 
that doesn't mean we should go ahead and make more mistakes just because 
a mistake was made in the past.





More information about the amber-dev mailing list