Concise method body + type inference ?

2018-10-03 Thread Remi Forax
I wonder if the concise method body proposal should not be extended to add parameters types/return type inference in case of overriding methods. The idea is that in case of a method overriding a method or implementing an abstract method the return type and the type parameters are optional like w

Re: Concise method body + type inference ?

2018-10-03 Thread Brian Goetz
I wonder if the concise method body proposal should not be extended to add parameters types/return type inference in case of overriding methods. In LVTI, we drew a bright line between inference in implementations and inference in declarations, for a good reason.  Clever observers commented

Re: Concise method body + type inference ?

2018-10-03 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "amber-spec-experts" > > Envoyé: Jeudi 4 Octobre 2018 00:17:47 > Objet: Re: Concise method body + type inference ? >> I wonder if the concise method body proposal should not be extended to add >> parameters types/return type i

Re: Concise method body + type inference ?

2018-10-03 Thread Alex Buckley
On 10/3/2018 3:32 PM, fo...@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

Re: Concise method body + type inference ?

2018-10-03 Thread John Rose
On Oct 3, 2018, at 3:56 PM, Alex Buckley wrote: > > 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 > omit

Re: Concise method body + type inference ?

2018-10-03 Thread Alex Buckley
On 10/3/2018 4:06 PM, John Rose wrote: On Oct 3, 2018, at 3:56 PM, Alex Buckley mailto:alex.buck...@oracle.com>> wrote: 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

Re: Concise method body + type inference ?

2018-10-03 Thread John Rose
D’oh. I stand corrected. > On Oct 3, 2018, at 5:30 PM, Alex Buckley wrote: > > You get a compile-time error if you don't. It's an `override` modifier in all > but spelling.

Re: Concise method body + type inference ?

2018-10-03 Thread Remi Forax
- Mail original - > De: "Alex Buckley" > À: "amber-spec-experts" > Envoyé: Jeudi 4 Octobre 2018 02:30:12 > Objet: Re: Concise method body + type inference ? > On 10/3/2018 4:06 PM, John Rose wrote: >> On Oct 3, 2018, at 3:56 PM, Alex Buckley > > wrote: