A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.
Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Please create a read-only mirror and link that instead.
100%. This is one of those things that every rust beginner assumes will be possible. That’s the best kind of language feature to stabilize.
In the case of if let chains the cognitive load is still kept there when the conditions somewhat interrelate, whereas let else bails you out in the case of divergence from an expected value leaving you to deal with the “nice” values only after you made clear what are erroneous states. Also the modification of these states is way easier with multiple let else statements.
if let chains are more than just combining multiple let expressions. It is not possible to write the following today, but is with the feature: