Concise method body + type inference ?
alex.buckley at oracle.com
Wed Oct 3 22:56:41 UTC 2018
On 10/3/2018 3:32 PM, forax at univ-mlv.fr wrote:
> Here the coupling is not between accessibility and inference, it's
> between overridden methods and inference, this coupling already
> exists, we have even introduced the annotation @Override in Java 5
> and 6 to make the coupling stronger, to be sure that people see that
> an overridden method and its implementation are strongly linked.
Let's say that Java 5 had the right idea by coupling an overriding
method to an overridden method, via @Override. Then, your proposal is at
odds with Java 5, because omitting the method signature of the
overriding method also means omitting @Override. (I assume you intended
for there to be no annotations on your lambda-like method bodies such as
`hashNext() -> index < end;`)
More information about the amber-spec-experts