Reply to post: Re: Pattern matching is not a big deal???

Java 17 arrives with long-term support: What's new, and is it falling behind Kotlin?

RichardBarrell

Re: Pattern matching is not a big deal???

I think pattern matching is easy to underestimate if you haven't used it. When people first hear about it, their initial reaction is often "slightly nicer switch statement, what's the big deal?"

The fact that sum types make the type system way more useful isn't obvious at first glance. You have to either think about it really really hard, or have someone show you one of the "make illegal states unrepresentable" essays.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon