How about some __initialize magic?
russhy
russhy at gmail.com
Sun Nov 28 03:19:49 UTC 2021
I would love to be able to do:
```D
T* t = alloc();
(*t) = .{};
// or better
t.* = .{};
// then we could also go ahead and be able to do like:
t.* = .{ field_a: 1, fiels_2: 2 }
```
Basically relaxing that rule:
https://dlang.org/spec/struct.html#static_struct_init
Other languages do that, and i love them
Don't let us stay behind because we refuse to more forward!
More information about the Digitalmars-d
mailing list