DIP 1020--Named Parameters--Community Review Round 2

Paul Backus snarwin at gmail.com
Tue Sep 10 14:52:53 UTC 2019


On Tuesday, 10 September 2019 at 14:19:02 UTC, rikki cattermole 
wrote:
>> 2. Way too much verbiage for declaring functions with named 
>> arguments.
>> 3.I still think the code breakage caused by named arguments is 
>> still overblown, I never encounter anyone in the C# who 
>> complains about code breakage regarding named arguments.
>
> The design C# has taken, was more restrictive and quite 
> importantly more conservative than both mine and Walter's.
>
> That may have been a key factor in it not breaking peoples code.

Having read DIP 1020, Walter's proposal, and the C# article, the 
only difference I can find (leaving aside the parts about 
templates) is that C# is more restrictive about how named 
arguments may be reordered. I fail to see how this difference 
could possibly have any impact on the potential for code 
breakage, since if a parameter name is changed, code will break 
regardless of what order the arguments are passed in.

If there's some other difference I'm missing that puts DIP 1020 
and Walter's proposal at greater risk of breaking code than C#'s 
named arguments, I'd appreciate if you could point it out 
explicitly, since I am probably not the only one to have 
overlooked it.


More information about the Digitalmars-d mailing list