Here’s the deal. “IF” an abstract base class can perform the same job, then it is the superior choice IMHO. But the point here is that it isn’t always a option. Examples include cross-cuts, as I’ve already mentioned, backward compatibility and avoiding special casing of other library code. Unfortunately (again IMHO) Java culture encourages overuse of interfaces when it is unnecessary. (As an example see section “12. Unintended consequences for the language” of the spec).
@Gudradain: Like Julien’s abstract base class suggestion, this does not address the issue at hand. And like abstract base classes, if a composite class can do the job, great, but it still doesn’t address the issues at hand.
Cringe!!! This is completely different from MI, like nsigma said: “that interfaces still do not contain state”. As stated in the spec, this is more like adding lightweight taits/mixins to the language.
It could be used in this manner, but I think that it would be pretty uncommon.
Yes backward compatibility is one the the big reasons. Although “new” code most likely will be called, but in a transparent way the the user doesn’t care about. I’d image that one of the big internal (JDK group) pushes for this is to allow using of lambdas in classpath classes.
BUT another reason is to get rid of some pointless boilerplate in code (something that has not been discusses at all in this thread). Oh yeah, java programmers seem to love their pointless boilerplate code…sigh. Exactly the kinds of things that can be done is still unclear since the spec isn’t finalized.