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

bauss jj_1337 at live.dk
Tue Apr 9 08:17:46 UTC 2019


On Tuesday, 9 April 2019 at 07:21:33 UTC, Daniel N wrote:
> On Monday, 8 April 2019 at 23:09:31 UTC, bauss wrote:
>> On Monday, 8 April 2019 at 16:33:36 UTC, Yuxuan Shui wrote:
>>> The interpretation of his proposal suggested by you (i.e. 
>>> this call is ambiguous) is obviously a possible one, but not 
>>> necessarily what Walter intended.
>>
>> And in that case it doesn't matter really because it's not a 
>> situation that would ever happen.
>
> Even if 'D' somehow defined that this is valid D code:
>
> void x(int p1) {}
> void x(int p2) {}
>
> Some linkers would refuse to link it (including our own OPTLINK 
> and the MS linker), since D has to support a great number of 
> different linkers, we cannot mandate that all linkers in the 
> world need to have a special force flag to override and link 
> anyway just to be compatible with the above construct.
>
> For that reason I don't think Walters comment is open for 
> interpretation, the above program is ill-formed.
>
> Even if, for compilation speed optimization reasons, the 
> compiler might not be required to issue a diagnostic, it still 
> doesn't change the fact that the program is ill-formed, another 
> conforming D compiler should be allowed to reject that code.

It's not valid D code when you try to call them, which is why it 
won't matter.


More information about the Digitalmars-d mailing list