The new match construct fixes both of these and is also an expression instead of a statement, allowing for more expressive code.