Yes, I think something like this has been suggested before, perhaps in concert with Pre-RFC: User-provided default field values. Though I think the syntax should probably be just MyStruct { mandatoryfields: 1, .. }
or similar (as there's no AutoDefault()
method you could write manually to emulate this.) Also, there was some recent discussion on Zulip regarding how Bevy specifically is struggling with poor ergonomics around defaults.
12 Likes