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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 7 14:52:47 UTC 2019


On 4/7/19 10:25 AM, Paul Backus wrote:
> On Sunday, 7 April 2019 at 13:48:09 UTC, Yuxuan Shui wrote:
>> On Sunday, 7 April 2019 at 03:09:23 UTC, Walter Bright wrote:
>>> On 3/31/2019 5:33 AM, Mike Parker wrote:
>>>> [...]
>>>
>>> Here's a much simpler proposal, based on the recognition that D 
>>> already has named parameters:
>>>
>>> [...]
>>
>> I thought people don't like opt-ins. Yet this DIP, your proposal, and 
>> several other proposals in this thread are all opt-in.
>>
>> Am I allowed to include the @named attribute in my DIP now? :)
> 
> Walter's proposal isn't opt-in. The declarations of `snoopy` in his 
> example are just regular D function declarations; there's nothing 
> special added to them to enable the use of named arguments.
> 
> This is, I think, conclusive evidence against the proposition that "W&A 
> will only accept an extremely conservative, opt-in version of named 
> arguments." So any further defense of syntax like DIP 1019's @named or 
> DIP 1020's angle brackets will have to be based on their actual merits, 
> rather than on the mistaken idea that they will make a DIP more likely 
> to be accepted.

Indeed. Probably a more accurate way to put it is "W&A will only accept 
/good/ ideas for named arguments (or anything else really)", which, 
however, is too general to be informative.

Walter's idea is in the same category as the "a line of code where most 
others would need one hundred" I was alluding to.

It is, in fact, so simple it's liable to be misunderstood. "This can't 
be so simple, there's got to be some opt-in trick somewhere".


More information about the Digitalmars-d mailing list