It’s nice to see that the ecosystem now gravitates more towards Default instead of argumentless new() functions.
I’ve been thinking about a possible feature that may be related and may also reduce the need to explicitly type Default::default() over and over again - it’d be nice if we could use partial FRU/auto-derive for the Default impl.
From my experience, structs usually have a few key data members that have to be explicitly initialized but also have a lot of supplementing data, all of which can be Default::default()ed.
So instead of:
MyData {
aux: important_bit.something(),
key: important_bit,
supp1: Default::default(),
supp2: Default::default(),
// ...
}
we could have:
MyData {
aux: important_bit.something(),
key: important_bit,
_: Default::default(), // open for bike-shedding
// ...Default::default() FRU not possible since there's no `impl Default for MyData`
Would that be considered useful and not expend the language complexity/quirkness budget?