Order of evaluation for named arguments

Salih Dincer salihdb at hotmail.com
Sat Mar 29 22:07:12 UTC 2025


On Saturday, 29 March 2025 at 18:38:31 UTC, Steven Schveighoffer 
wrote:
> 
> So the question is, should we modify the spec to reflect this, 
> or would it be better to change the compiler to enforce this 
> left-to-right evaluation rule?
>

Given these considerations, I think updating the specification is 
the more pragmatic approach. The specification could be amended 
to state:

> "Positional arguments are evaluated left to right. Named 
> arguments are evaluated in the order of formal parameter 
> declarations."

@SDB at 79



More information about the Digitalmars-d mailing list