this post was submitted on 01 Sep 2025
31 points (94.3% liked)
Rust
7446 readers
105 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Their suggested replacement is closer to C#'s
iskeyword:The issue here is that we still have let-else, which can't be translated as easily:
I don't think the alternative to let-else is too bad.
That's not an alternative, it's removing
let-elseentirely. It's equivalent to this:let-elseis specifically a feature that allows you to use a refutable pattern to deconstruct a value by providing a divergingelsebranch.Removing
let-elseis the whole point of the linked article series:Being able to do to everything Rust does, but without Rust's zoo of
if-then-else,match,if-let,let-elseetc.