Optional<X> x = ...;
switch (status(x)) {
case SOME: return x.get() * 10;
case NONE: .... send error ...
}
Again I really like the matching functionality but as it stands, since it's not included, it's not worth much without it in my opinion.With match, that cleans up a LOT of code and if the compiler can guarantee no speed or memory hits for doing this it becomes very valuable very quick.
It's one of the reasons I wanted to learn Rust.