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

Jonathan Marler johnnymarler at gmail.com
Thu Jun 6 20:10:06 UTC 2019


On Thursday, 6 June 2019 at 20:04:09 UTC, 12345swordy wrote:
> On Thursday, 6 June 2019 at 19:17:38 UTC, Jonathan Marler wrote:
>> [...]
>
> This has been brought up in the discussion regarding named 
> arguments for DIP1020 (more specifically the @named attribute) 
> and so far I am not convinced that this is an issue that needs 
> to be address, and found it be be overblown given that we have 
> powerful rename tools at this day of age.
>
> Having it "opt-in" have it own downsides as the users have to 
> request library developers to add the capability to their 
> libraries. Among many other issues that were brought up and 
> discuss with "opt-in"ing DIP1020.
>
> Alex

Rename tools are irrelevant as they only work when you're in a 
single project.  Exposing the parameters names of every function 
would mean the we would pretty much need to keep all the 
parameter names in every function in druntime/phobos, otherwise 
we would break compatibility.

Far to high of a cost just to allow some cases to be more 
readable.  However, if you make it opt-in, then you don't have to 
pay that cost for EVERY function, you only increase coupling in 
the cases that make sense.


More information about the Digitalmars-d mailing list