PROPOSAL: Named and Optional parameters, "Java-style"
向雅
fyaoxy at gmail.com
Mon Aug 22 03:19:16 PDT 2011
Why so many parameters?
It's design problem.
2011/8/22 Frédéric Martini <frederic.martini at gmail.com>:
> 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