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 let
as a one-handedmatch
with no exhaustive checking enforced. It often has nothing to do withif
orlet
, that's why it is so confusing. :)Maybe it would be better to rename the whole operator, call it
match once
or something like that.
(slightly modified to make sense without the context)