Hacker News new | past | comments | ask | show | jobs | submit login

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.



This 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: