3 ms·
I like this. It seems similar to `if let Some(value) = option` in Rust, with `?` replacing the pattern matching and supporting multiple assignments. Rather th
by FragenAntworten 3y ago
I like this. It seems similar to `if let Some(value) = option` in Rust, with `?` replacing the pattern matching and supporting multiple assignments.
Rather than something like this:
if let Some(a) = option_a; let Some(b) = a.option_b {
...
} else {
...
}
you'd have something like this:
if let b = option_a?.option_b? {
...
} else {
...
}
(Pseudocode for both examples.)