2 ms·
Aside from compile-time optimization, pattern matching is just this additional if at runtime. It is questionable if pattern matches make code more readable sinc
by wruza 9y ago
Aside from compile-time optimization, pattern matching is just this additional if at runtime. It is questionable if pattern matches make code more readable since when you see foo(42) call and def foo(42) is defined elsewhere, you can spend some time on original function until realizing that it’s not what you’re looking for. The same for type-based and operator overloading. It only makes code beautifu^W hard to guess.
Though it does look nice for fib and fac.