DIP 1019--Named Arguments Lite--Community Review Round 1

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Wed Feb 27 11:21:24 UTC 2019


On Sunday, 17 February 2019 at 17:09:57 UTC, Yuxuan Shui wrote:
> On Sunday, 17 February 2019 at 13:12:11 UTC, Rubn wrote:
>>
>> Allowing two functions to exist with the same type signature 
>> just adds unnecessary complexity.
>
> This is allowed, _right now_. This is not an addition made by 
> this DIP. Example: https://d.godbolt.org/z/hbwsaU

That seems to be a misunderstanding of what that example does.  
The first two declarations are just declaring that a function 
should exist with the signature `int fun(int, int)`.  The third 
declaration actually implements that function.

If OTOH you delete the implementation and use `dmd -c` to compile 
without linking, you'll get the expected overload-related error, 
whether or not you have the same or different parameter names, or 
no parameter names at all, in those first two declarations.


More information about the Digitalmars-d mailing list