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

Maybe I'm misunderstanding your comment, but aren't case classes a fundamental piece of pattern matching? Or are you rather just suggesting the importance of which kinds of pattern matching are the most important?



match { case v: java.util.Date => }

This still works without case class extractors and is useful. That's what I mean by matching and binding.

Extracting/destructuring in the match statement can sometimes be more trouble than it's worth. It's definitely brittle to changes in the case classes. Then there's the question of the (difficult to reason about?) cost of the abstraction.




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

Search: