Thoughts on this idea for a new `select!` syntax in crossbeam-channel? select! { recv(r, msg) => {} // `msg` is of type `Result<T, RecvError>` send(s, msg) => {} default(Duration::from_secs(1)) => {} } The Go equivalent is in the next tweet.
An alternative might be to have two kinds of `recv` cases: select! { recv(r, msg) => {} // `msg` is of type `T`, doesn't fire if `r` is closed recv?(r, msg) => {} // `msg` is of type `Result<T, RecvError>` send(s, msg) => {} // doesn't panic if `s` is closed }