Order of evaluation for named arguments

Timon Gehr timon.gehr at gmx.ch
Fri Apr 11 01:31:52 UTC 2025


On 4/10/25 08:57, Walter Bright wrote:
> On 4/3/2025 1:31 PM, Timon Gehr wrote:
>> AFAIU both my frontend and SDC went with strict source-order 
>> evaluation. That seems like the only sensible generalization of left- 
>> to-right function argument evaluation, but perhaps common sense is not 
>> so common after all.
> 
> The spec is silent about how named arguments for functions and for 
> struct literals affect order of evaluation.
> 
> I can well understand you being highly annoyed after having written an 
> implementation in good faith.

If what you now seem to want to write into the spec made _more sense_ 
than what I had implemented, I would not complain at all. I went with 
the sensible thing, further emboldened by statements such as: "Let's 
leave this on the back burner until the front end actually implements 
consistent LTR evaluation."


More information about the Digitalmars-d mailing list