Hi Cédric, > I'm 100% sure a syntax like that has been discussed in the past Well...I missed that discussion...
> 1. consistency between using annotations and a type-checking only feature I propose to transform `Closure<String, Number -> Date>` to the annotations(i.e. `@ClosureParams`), so we can keep the consistency. > 2. what about polymorphic closures (aka closures which accept different > kind of arguments) You mean something like `Closure<String, Number -> Date>`? > 3. the arrow syntax making it hard to read, in particular when the > argument types have generics themselves It depends developers' preferences... e.g. ①``` Closure<String, Tuple2<Number, String> -> Date> ``` VS ②``` @ClosureParams(value= SimpleType.class, options="String, Tuple2<Number, String>") Closure<Date> ``` Syntax① looks better to me ;-) Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html