3 ms·
I second the question, pattern matching is cool for destructuring or for completeness checking (not sure those are fundamental properties of pattern matching th
by riffraff 14y ago
I second the question, pattern matching is cool for destructuring or for completeness checking (not sure those are fundamental properties of pattern matching though), but it does not solve the problem of adding new behaviour without changing existing code any more than an `if` does.
- ufo 14y agoThis is not a bug - its a feature! Pattern matching/ifs are good for creating new functions, while OO style makes it hard to add new methods.