Will D ever get optional named parameters?
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 13 16:35:17 PDT 2014
On 10/13/2014 4:09 PM, bearophile wrote:
> bachmeier:
>
>> def foo(x: int = 1000, y: double = 0.0): double {}
>>
>> If you later change the names to something more informative
>>
>> def foo(reps: int = 1000, variance: double = 0.0): double {}
>
> You can use:
>
> double foo(int deprecated(x) reps=100, deprecated(y) variance=0.0) {...}
Please, no.
More information about the Digitalmars-d
mailing list