DIP 1019--Named Arguments Lite--Community Review Round 2
aliak
something at something.com
Fri Jun 7 08:07:31 UTC 2019
On Friday, 7 June 2019 at 06:30:15 UTC, Walter Bright wrote:
> On 6/6/2019 2:43 PM, Aliak wrote:
>> On Thursday, 6 June 2019 at 20:04:15 UTC, Walter Bright wrote:
>>> discovered as necessary behavior. Consider:
>>>
>>> void snoopy(T t, int i, S s); // A
>>> void snoopy(S s, int i = 0; T t); // B
>>>
>>> and calling it:
>>>
>>> snoopy(t:t, i, s:s); // A
>>> snoopy(s:s, t:t, i); // A
>>
>> Trying to understand why the last two call A and are not
>> ambiguous?
>
> Argument `i` is not named, and so can only appear after `t` in
> A, and only after `s` in B. This only works for A.
What makes i unnamed and the others named?
You mean you want for unnamed arguments to only occur after the
last named argument?
More information about the Digitalmars-d
mailing list