2 ms·
> One example: Your example is a minor but quite useful piece of syntactic sugar, which was introduced a few years in following a similar construct being succe
by masklinn 3y ago
> One example:
Your example is a minor but quite useful piece of syntactic sugar, which was introduced a few years in following a similar construct being successful in Swift. You can read the entire reasoning at https://rust-lang.github.io/rfcs/0160-if-let.html https://rust-lang.github.io/rfcs/0160-if-let.html
- 38 3y agoI agree with the GP. "if let" is just such a weird contruct that it doesn't feel justified to be in the language. it just screams of over engineering. now "let else" is cool.