I can’t help but suspect it doesn’t offer much and you may as well just use match
statements for whenever you want pattern matching, however many times it might be slightly more verbose than what you could do with if let
.
I feel like I’d easily miss that pattern matching was happening with if let
but will always know with match
what’s happening and have an impression of what’s happening just from the structure of the code.
I think the rust book gives a good example. The match syntax is just a waste here.
So if you have a single expression that you want to match I think it is worth it.
As with most syntax, the more you read it the more you’ll just spot it without thinking.