Formal model for defender method resolution

Brian Goetz brian.goetz at
Thu Feb 3 07:09:39 PST 2011

>>> Neal Gafter said the following on 02/02/11 16:30:
>> Do you consider that if a method is overriden in C then it doesn't matter
>> if it is also mixed-in explicitly?
> Yes.  Today, explicitly mixing in an interface that you otherwise already
> implement has no practical effect on the compile-time meaning.

And I believe this pattern is common enough that preservation of this 
behavior is a requirement.

Which means:

intf Collection { /* methods with defaults */ }
intf Set { /* methods which may override Collection defaults */ }

class Foo implements Set, Collection { X }

   should have identical meaning to

Class Foo implements Set { X }

Hence the rationale for pruning / occlusion in both the writeup and the 
formal model.

More information about the lambda-dev mailing list