Updated State of the Lambda

Gernot Neppert mcnepp02 at googlemail.com
Mon Dec 12 11:11:21 PST 2011


Am 12.12.2011 12:46, schrieb Maurizio Cimadamore:
> concrete methods, but applied to extension methods. We feel like we need
> an explicit re-abstraction mechanism, as it is quite common in Java code
> to repeat an interface method declaration is a sub-interface just for
> documentation purposes. If the redeclaration was interpreted by the
> compiler as a re-abstraction we would be introducing subtle semantics
> change associated with such re-declaration of interface methods and the
> only way out for the developer would have been to re-specify the default
> implementation for the extension method (which would be the most common
> use case, as opposed to re-abstraction, which is quite rare).
>
> Maurizio

Another purpose of re-declaring interface methods can be to provide  a 
more specific return type (a.k.a "covariant return type").
If, as the current proposal seems to suggest, a mere re-declaration does 
not re-abstract a method, how will that fit in with covariant return types?



More information about the lambda-dev mailing list