Hacker News new | ask | show | jobs
by FragenAntworten 984 days 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.)