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

Dukc ajieskola at gmail.com
Tue Sep 24 15:49:31 UTC 2019

On Tuesday, 10 September 2019 at 09:06:23 UTC, Mike Parker wrote:
> This is the feedback thread for the second round of Community 
> Review for DIP 1020, "Named Parameters"

You're forbidding calling a function with a positional argument 
coming after a named argument, except when the order is exactly 
the same as in the function definition. I don't think that's a 
good idea, because it makes order of the named parameters 
relevant. That may make the function complex to ABI mangle, and 
prevents function definer from freely reordering named parameters 
afterwards. I think you should either:

-require named arguments to come last in the call (and perhaps 
the corresponding parameters in the function definition)
-allow a positional argument to come last in any case. The caller 
may stick named arguments anywhere in the argument list, only 
exception being that named parameter can't be passed by UFCS.

Otherwise I like this. The best named argument proposal in the 
reviews so far.

More information about the Digitalmars-d mailing list