DIP 1030--Named Arguments--Community Review Round 1 Discussion

Walter Bright newshound2 at digitalmars.com
Tue Feb 11 19:07:23 UTC 2020


On 2/11/2020 5:52 AM, Steven Schveighoffer wrote:
> An example:
> 
> foo(a: 1, b:2);
> 
> Now I want to replace all calls to foo with a special wrapper that logs all calls.
> 
> alias foo = logCalls!(.foo);
> 
> foo(a: 1, b:2); // error, cannot use named parameters with tuples.
> 
> Is there a plan to mitigate this limitation?

Currently, no.

The current plan is named arguments will not match to ...

This leaves the door open to a future enhancement along those lines, which is 
better than trying to gin up an awkward solution.


More information about the Digitalmars-d mailing list