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

Yuxuan Shui yshuiv7 at gmail.com
Sun Apr 7 17:14:49 UTC 2019


On Sunday, 7 April 2019 at 14:25:43 UTC, 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.
>
Yeah. Sorry, I misread the proposal.

The only problem I can see for now is that this proposal seems to 
mandate the inclusion of parameter names in mangled name of 
functions. Which makes name changes not only API breakages, but 
also ABI breakages.




More information about the Digitalmars-d mailing list