3 ms·
nothing wrong with switch statements.
by systematical 6y ago
nothing wrong with switch statements.
- zowanet 6y agoCoerced-typed (weak) comparisons and easy accidental fallthrough are the problems commonly associated with switch statements. The new match construct fixes both of these and is also an expression instead of a statement, allowing for more expressive code.