July 03, 2017
The spec (or DMD frontend) is broken regarding struct initialization with explicit mention of member field names:
https://dlang.org/spec/struct.html#static_struct_init

The spec says:
"The static initializer syntax can also be used to initialize non-static variables, provided that the member names are not given."

But this code compiles correctly:
```
struct S { int a; int b; int c; int d = 7;}
void test(int i)
{
    S q = {a : 1, c : i }; // q.a = 1, q.b = 0, q.c = i, q.d = 7
}
```

I haven't come up with a reason for why it would not be allowed to use member names, so I think it is an error in the spec. If not, please explain. If yes, please fix the spec.

Thanks!
  Johan

July 04, 2017
On Monday, 3 July 2017 at 18:14:43 UTC, Johan Engelen wrote:
> The spec (or DMD frontend) is broken regarding struct initialization with explicit mention of member field names:
> https://dlang.org/spec/struct.html#static_struct_init

I agree, PR:
https://github.com/dlang/dlang.org/pull/1794