Default method survey results

Peter Levart peter.levart at
Fri Aug 17 03:45:28 PDT 2012

On Thursday, August 16, 2012 02:33:41 PM Maurizio Cimadamore wrote:
> What I'm saying is that there 
> already is a place where you have to specify a keyword where the 
> compiler could obviously infer one for you. And yet, I haven't seen that 
> many discussions as to why compiler requires you to write:
> class Foo {
> abstract foo();
> }
> isn't that obvious? There's no body!!! Should we change the 
> compiler/language? I don't think so - for the same reasons as I think we 
> should keep 'default'.

But that's actualy not that bad idea. Would you design a new language with 
"abstract" method modifier or without it? Now is a chance to make it implicit 
in methods without a body (be it in class or in interface). That's backward 
compatible and consistent.

Now if anyone whished to make a visible distinction between abstract and 
concrete (default) methods in interface, she could write:

interface Foo {
  abstract void foo();
  void bar() { foo(); foo(); }

Regards, Peter

More information about the lambda-dev mailing list