PROPOSAL: Named and Optional parameters, "Java-style"

Frédéric Martini frederic.martini at gmail.com
Mon Aug 22 01:43:27 PDT 2011


On my proposal, parameter's names are stored on a annotation.
But a class-file update would be better, even if it's "against the
spirit of coin".


2011/8/18 Brian Goetz <brian.goetz at oracle.com>:
>
> But, even if it did, another thing that makes a proposal "big" is "touching
> method overload resolution rules".  And the essence of this proposal is
> adding another layer of complexity to method overload resolution.
>
>
I think it does not affects method overload rules.
Like Java 5.0 varargs, this proposal is based on a special type that
will contains the parameters list.



For exemple, a methode like this :

     public void exemple({int foo=30, String bar="hi"})

will generate a method signature like this :

     public void exemple(OptArgs)



Adding optional parameters will not affect the method signature.



More information about the coin-dev mailing list