3 ms·
The main advantage of pattern matching is that you can't forget it. If you forget to check for null, the customer complains that the program crashed. If you for
by mdpopescu 10y ago
The main advantage of pattern matching is that you can't forget it. If you forget to check for null, the customer complains that the program crashed. If you forget to handle the cases in a pattern, the compiler complains to you.