What should default interfaces be for?

Richard Warburton richard.warburton at gmail.com
Thu Mar 15 14:42:52 PDT 2012


>> It's too bad Odersky doesn't say HOW the defender method spec falls
>> short of supporting Scala traits.
>
> On Twitter Odersky said: "In essence, Java 8 default methods only work for
> traits that do not override methods in base classes."

I presume he's referring to the way the method call resolution prefers
methods in the concrete class hierarchy to default methods whenever
there is a choice between the two.

regards,

  Richard


More information about the lambda-dev mailing list