Explicit public on static interface methods?

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Wed May 15 00:29:02 PDT 2013


Hi,


On Wed, May 15, 2013 at 8:57 AM, Andrey Breslav <
andrey.breslav at jetbrains.com> wrote:

> > John Rose made this observation/suggestion:
> >
> > Implicit public considered risky:  After working for a while on a new
> interface, I realized
>
> Observation 1: We will never be able to have package-private members in
> interfaces, unless we require explicit public now.
>
We can, if we add 'package' keyword to modifiers.

Observation 2: Having static methods and fields inconsistently handled for
> interfaces looks ugly. Fields are public by default, so making methods
> package-private by default would look odd. (By observation 1, we can't have
> package-private fields in interfaces).

I agree. we already have different default accessibility for classes and
interfaces. changes to these conventions introduces  inconsistency and
breaks existing code.

Ali Ebrahimi


More information about the lambda-spec-observers mailing list