Hi all, Following on from this thread on the old mailing list <http://groovy.329449.n5.nabble.com/Proposal-NamedParameters-AST-transform-td5156566i10.html> ...
Given that JDK8 now supports accessing parameter names at runtime <http://openjdk.java.net/jeps/118>, I'd like to incorporate this behaviour into the Groovy compiler. I'm proposing adding a command line/configuration change to the groovyc compiler, to add reflective information to the compiled bytecode (i.e. the parameter names). I'm not proposing any changes to the current behaviour of method invocation (using named parameters). Some points for discussion: 1) JDK8 parameter names are available in the compiled bytecode, which is not backwards compatible. I don't see this as a problem, as long as it's well documented. 2) JEP118 <http://openjdk.java.net/jeps/118> is enabled by using the compiler command "-parameters". Should we be consistent and use "-parameters" for the groovyc compiler, or have a more descriptive parameter name? Thoughts? Thanks, Nick
