new keyword 'extension' really necessary?
brian.goetz at oracle.com
Thu Aug 5 09:46:07 PDT 2010
In addition to Maurizio's syntactic arguments, we believe there is value in
identifying extension methods as, well, extension methods.
On 8/5/2010 12:33 PM, Gernot Neppert wrote:
> Hi Maurizio,
> I do not have compiler writing skils, so I'm curious why the keyword
> 'extension' should be nessesary to introduce defender methods.
> A defender method declaration without the prefix 'extension' looks quite
> distinguishable to me. Example:
> interface List<E>
> void sort(Comparator<? super E> comp) default Collections.sort(List<E>);
> So, why the new keyword?
> (An answer such as 'This is necessary to disambiguate the grammar' would
More information about the lambda-dev