3 ms·
True, but honestly pattern matching is so cool that all languages should have it and ditch switch statements.
by baby 6y ago
True, but honestly pattern matching is so cool that all languages should have it and ditch switch statements.
- chriswarbo 6y agoThankfully Python has avoided switch statements. Hopefully pattern-matching will take the place of if/elif/elif/else chains, or dereferencing dictionary literals (e.g. `{case1:foo, case2:bar, ...}[myVal]`)