[records] Summary so far

Peter Levart peter.levart at gmail.com
Thu Mar 19 14:27:50 UTC 2020



On 2/28/20 1:07 PM, Remi Forax wrote:
>> Q10. Special annotation for explicit declaration of accessors.
>>
>>     Tagir [6] proposes a new `@RecordAccessor` annotation to mark explicit
>>     accessors, much as `@Override` is used to mark method overrides.
>>
>>     A: Rather than introduce a new accessor, we will consider extending the
>>     meaning of the `@Override` annotation to include this case.
> I agree, @Override is fine here even if it's not a real override (using @Override on an asbtract method of an interface is not a real override too so @Override doesn't mean @Override since Java 6 anyway).
>
So, wouldn't this be confusing? For example, if a record declaration 
also declared that it implements an interface, you wouldn't know from 
the 1st glance whether such method is an explicit declaration of 
accessor or just implementation of the interface method or maybe both? 
Would someone mind?

Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20200319/bd77f8c6/attachment.htm>


More information about the amber-spec-experts mailing list