3 ms·
It's also important to consider comments in context :-) The advice I was commenting on explicitly advised against using switch statements. I agree with everyth
by noelwelsh 8y ago
It's also important to consider comments in context :-) The advice I was commenting on explicitly advised against using switch statements.
I agree with everything else you've said.
(For the pedantic: one can argue about the definition of polymorphism. "Type constructors" do not create distinct types in an algebraic data type as implemented in ML and Haskell, so arguably destructing an algebraic data type using pattern matching is not an instance of polymorphism as the input type is not varying. However that is not germane to this discussion.)