Order of evaluation for named arguments

Salih Dincer salihdb at hotmail.com
Sun Mar 30 10:01:49 UTC 2025


On Sunday, 30 March 2025 at 09:40:10 UTC, Salih Dincer wrote:
> ...I don't think it's directly related to our topic...

Like I said, there's no relevance/problem here. Because there is 
no ordering from the right or the left. The compiler selects and 
initials it according to the order in the struct.

```d
     enum fun = (int v) => v;

     S r = { b:fun(1), a:fun(2) };
     r.writeln; // S(2, 1)
```

SDB at 79




More information about the Digitalmars-d mailing list