Discussion Thread: DIP 1030--Named Arguments--Final Review
Jonathan Marler
johnnymarler at gmail.com
Wed May 13 20:44:59 UTC 2020
On Wednesday, 13 May 2020 at 20:42:32 UTC, Steven Schveighoffer
wrote:
> On 5/13/20 3:44 PM, Jonathan Marler wrote:
>
>> I found a way:
>>
>> void copy(string, string destination)
>> {
>> alias source = _param_0;
>> }
>>
>> I didn't realize you could do this till now but this allows
>> functions to "opt-out" of using named parameters. We may want
>> to consider using this pattern throughout phobos/druntime when
>> we want want to prevent parameter names from being apart of
>> the API.
>>
>
> That is an implementation detail, and not a spec feature.
>
> It would have to be properly defined for it to be a sufficient
> workaround.
>
Darn
> Also, there is no guarantee that with this DIP:
>
> copy(_param_0: "foo", destination: "bar")
>
> doesn't work. There would have to be.
>
This one isn't as concerning to me.
More information about the Digitalmars-d
mailing list