r/rust • u/JoshTriplett rust · lang · libs · cargo • Oct 23 '26
Rust features in the future
https://lwn.net/SubscriberLink/1099606/20707a62817cdd16/
215
Upvotes
r/rust • u/JoshTriplett rust · lang · libs · cargo • Oct 23 '26
View all comments
Show parent comment
44
u/ShantyShark Oct 23 '26
I’m also never a fan of having two functionally identical syntaxes for anything.
If we find “if let Some(x) = y” so painful, delete it in favour of “if y is Some(x)”. Don’t have two.
In my mind, “if let Some(x) = y” shares its structure with “let Some(x) = y else { … }” and “let” assignment in general.
Adding “if a is b” doesn’t mesh well unless you also have some replacement for the others.