Order of evaluation for named arguments

Steven Schveighoffer schveiguy at gmail.com
Sat Mar 29 21:25:17 UTC 2025


On Saturday, 29 March 2025 at 18:45:14 UTC, monkyyy wrote:
>
> I dont read it as wrong, thats left to right at the callsite; 
> which if the compiler did extra work to break named arguments 
> changing the order of operations would be anti-feature

No, it's the opposite. It takes the order based on the parameter 
order (at declaration), not the argument order (at the call site).

I can agree that properly processing the arguments in written 
order could be more difficult to process in the compiler. But I 
don't know for sure.

In any case, there is a mismatch between the spec and the 
implementation.

-Steve


More information about the Digitalmars-d mailing list