Final defenders

Aleksey Shipilev aleksey.shipilev at
Tue Aug 7 14:55:39 PDT 2012

On 08/08/2012 01:39 AM, Rémi Forax wrote:
> On 08/07/2012 08:16 PM, Aleksey Shipilev wrote:
>> On 08/07/2012 09:55 PM, "Zdeněk Troníček" wrote:
>>> StatefulOp should be declared as abstract class, not interface.
>>> Concerning the final methods in interfaces, I view default methods as a
>>> means for API evolution and from this point of view, they do not seem
>>> particularly useful.
>> Yes, in the Java 5-7 they indeed should be abstract base classes. But in
>> this case, lambdas requiring functional interfaces. Making StatefulOp an
>> abstract class will prohibit making a StatefulOp-typed lambda.
>> Maybe the answer lies in allowing lambdas implement abstract classes,
>> but that would be MUCH more mess than allowing final defenders.
> Hi Aleksey,
> a lambda can not be created from an abstract class without loosing a lot.

Thanks, that's exactly what I meant with "MUCH more mess". ;)


More information about the lambda-dev mailing list