Public defender methods and static inner classes in interfaces?

Pavel Minaev int19h at gmail.com
Mon Sep 13 19:39:47 PDT 2010


On Mon, Sep 13, 2010 at 7:03 PM, Jim Mayer <jim at pentastich.org> wrote:
> Currently interfaces have a well defined purpose: they specify a contract
> without an implementation.  That's a simple concept to get across and the
> language enforces it.

Unfortunately, it is too simple for many practical purposes. It's no
surprise that most "Java++" languages (e.g. Scala) go even further,
all the way towards traits.

> interfaces were introduced, I assume, because of
> the widespread concern about multiple inheritance.  Defender methods raise
> the same issues as multiple inheritance

Issues with multiple inheritance are primarily when inheritance of
state is involved, which is not the case with defender methods.


More information about the lambda-dev mailing list