3 ms·
Unfortunately, pattern matching isn't available in many languages (or at least, including a new dependency for the sake of removing `if`s may not be worth it).
by chriswarbo 10y ago
Unfortunately, pattern matching isn't available in many languages (or at least, including a new dependency for the sake of removing `if`s may not be worth it).
On the other hand, the article recommends using sub-type polymorphism, which is also unavailable in many languages.