A couple of questions about Project Lambda

Alex Buckley alex.buckley at oracle.com
Fri Aug 13 11:58:38 PDT 2010


On 8/13/2010 5:48 AM, Rémi Forax wrote:
> Le 13/08/2010 14:19, Marcus Thiesen a écrit :
>> SAM Conversion:
>> The spec in [2] says "A SAM (Single Abstract Method) type is a
>> top-level class or interface
>> type with abstract member". I misread this as "top-level class or
>> top-level interface", but the implementation actually works with
>> member interfaces [3] which strikes me as inconstistent because I can
>> use SAM conversion with a member interface but not with a member
>> class, is there any reason for this?
>>    
> 
> A member class (not static) has a back reference to its enclosing class.

Yes. The aim is really to allow _non-inner_ classes, i.e. either a) 
top-level classes or b) nested classes which are static. Also, member 
interfaces are fine because they're implicitly static. Good catch, Marcus.

Alex


More information about the lambda-dev mailing list