const Foo = struct {
bar: u8,
baz: u8 = 42,
};
For the struct above, if I had to initialize all fields to undefined, I would do something like:
const foo: Foo = undefined;
How can I initialize all fields without a default value to undefined besides doing:
const foo = Foo{ .bar = undefined };
For structs with a large number of fields this can get pretty verbose.