Coming from other functional languages (and being a Rust newbie), I\'m a bit surprised by the motivation of Rust\'s if let syntax. The RFC mentions that without
A quote from a related issue against The Rust Programming Language:
You'd better think about
if letas a one-handedmatchwith no exhaustive checking enforced. It often has nothing to do withiforlet, that's why it is so confusing. :)Maybe it would be better to rename the whole operator, call it
match onceor something like that.
(slightly modified to make sense without the context)