Closed rcoh closed 2 years ago
I only see that the advantages being mentioned but not the disadvantages. Most of the time I see this as unnecessary because it prevents the compiler from doing its job to check that the developer handle all the fields. This could be one example, in most cases having a breaking change by adding a new field to an enum is better than using #[non_exhaustive]
as the user may not even notice that there is a new field if they want to handle all fields.
Maybe we should have a good example on both decisions and when to apply (or not to) them.
I've fleshed out the discussion some more although I think there's still a bit more to do
@pickfire @MarcoIeni Want to give it a read as well?
@rcoh What did you want to add to it still? Or is it fine from your side now?
good from my side
@rcoh I think only the last review comment is left and fixing the doc test and then we're good to go! :)
Seems @rcoh lost interest on this. Can a team member finish it? It's a pity that the old article is online while this is almost ready.
Seems @rcoh lost interest on this. Can a team member finish it? It's a pity that the old article is online while this is almost ready.
Should be fine now, @MarcoIeni @pickfire might want to read over it once more so we can merge it.
Thank you everyone. :)
A first cut at discussing how
#[non_exhaustive]
should be used.Fixes #132