Open ericlippert opened 7 years ago
The text of chapter 17 on interface methods says
"Methods declared in an interface must not be declared abstract."
That's correct but incomplete. We should add to this:
This is good to point out because many languages do not allow static interface methods.
Clearly it makes no sense to have a protected or private interface member; they're implicitly public.
HHVM allows the "public" to be elided, even though technically that is not quite grammatical. I think that's a reasonable rule.
The text of chapter 17 on interface methods says
"Methods declared in an interface must not be declared abstract."
That's correct but incomplete. We should add to this:
This is good to point out because many languages do not allow static interface methods.
Clearly it makes no sense to have a protected or private interface member; they're implicitly public.
HHVM allows the "public" to be elided, even though technically that is not quite grammatical. I think that's a reasonable rule.