Default method survey results
scolebourne at joda.org
Fri Aug 17 04:14:18 PDT 2012
On 17 August 2012 11:45, Peter Levart <peter.levart at marand.si> wrote:
>> 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.
concrete method in class: normal, no surprises, thus no keyword
abstract method in class: significant, changes semantics, keyword
abstract method in interface: normal, no surprises, thus no keyword
concrete method in interface (default): ??????
The argument is whether the last case is significant and
semantic-changing enough to need a keyword. While its significant to
someone upgrading from 7 to 8, it won't be in 5 years time. Its just
another concrete method that may or may not be used.
However, abstract methods on classes are definitely worthy of note, as
they change the way the whole class is thought of.
Verbosity in Java can be a strength. Excess verbosity isn't.
More information about the lambda-dev