What should default interfaces be for?

Richard Warburton richard.warburton at gmail.com
Wed Mar 14 12:00:31 PDT 2012


> I dislike the idea of allowing implementation inside interfaces, so I
> see default methods as a necessary evil for interface evolution. And I
> fully agree with the view that developers should not implicitly depend
> on default methods. Even more: why not let the Java compiler emit a
> warning when classes do depend on default methods?
>
> PS: in case it wouldn't be clear by now: I 'm against allowing Object
> methods as default methods :)

Hey,

I think it would be a helpful if you explained your perspective a
little more.  I'm sure you've undertaken some thought and come up with
cases where its open to abuse - what are they?  Perhaps you don't like
the confusion between the method signature specification (an
interface) and the implementation.  I always think its good to
understand why you've reached an opinion, rather than simply what that
opinion is.

regards,

  Richard


More information about the lambda-dev mailing list