JEP proposed to target JDK 11: 323: Local-Variable Syntax for Lambda Parameters

Florian Weimer fweimer at redhat.com
Tue Jan 30 09:21:58 UTC 2018


On 01/26/2018 04:08 PM, Maurizio Cimadamore wrote:
> 
> * the second reason, which was pointed out correctly in the email, is to 
> provide a path to add modifiers (such as 'final') and or annotations to 
> a lambda parameter w/o the need of resorting to explicit types.

I would love to see some more discussion how you plan to add annotation 
support without reifying the lambda.  There was a recent discussion 
about the lack of generic type information for lambdas, and people 
didn't want to add this.  Why would we do essentially the same thing for 
annotations?

On this thread, it has been suggested that the annotation on the lambda 
parameter would instead be applied to the type parameter of a generic 
type.  Was this an oversight, or is this expected to be part of a future 
design?

Thanks,
Florian


More information about the jdk-dev mailing list