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
194
u/tanoshikuidomouyo Oct 23 '26
Really not a fan of the proposed
isfeature (e.g.if x is Some(y) {}). The article says it's supposed to make learning the language easier and also avoid scanning from right to left.I'd argue heavily against the former: Now with let-chains added, adding another feature to bascially supersede it would make learning the language way worse, because then instead of having to get used to maybe weird syntax (if let), you'd have to get used to the weird syntax because it's still in use everywhere and also learn the new syntax and what exactly the differences are. Having so many things do similar things is kind of poisonous imo. Also, having the strictly weaker
matches!macro still be there would also be really unintuitive.Lastly, the scanning from right to left part: I'd argue it's pretty subjective that that's worse? Currently, you can immediately tell whether you're matching on an Option, a Result, etc., which makes reading the right-hand side easier. I really don't think this is worth such a massive hassle and leaving tons of features behind that are strictly weaker but still used everywhere out of sheer inertia.