DIP 1030--Named Arguments--Community Review Round 1 Discussion

Arine arine123445128843 at gmail.com
Tue Feb 11 13:28:58 UTC 2020


On Tuesday, 11 February 2020 at 09:46:35 UTC, Paolo Invernizzi 
wrote:
> Let's put It simple, and let's boil this down to essential: 
> there's MORE probability of FUTURE breakage with named 
> parameters, and that's a fact.

Only if you use the feature. That's part of the reason why I 
don't think you should be able to set a default of the middle 
argument. This just forces someone to use the feature if they 
want a default parameter. Neither C# nor Python allow you to set 
a default parameter in the middle without the rest that follow 
also having default values.

Other than that, if you don't want your code to break potentially 
from argument changes, then don't use named parameters.




More information about the Digitalmars-d mailing list