Hacker News new | ask | show | jobs
by rld 4259 days ago
Not mentioned here: pattern matching. It certainly goes a long way to ensure all cases are being handled, since the compiler lets you know when your patterns are non-exhaustive.
1 comments

It is.

"Yes, you can write more concise code; yes, you have a more advanced type system; yes, you can pattern match. There are hundreds of other reasons that Scala makes a great language. When a language can offer me constructs to write more correct code, I'll always be willing to deal with the learning curve."

I think the point was that these are the things that he thinks are of more value to developers than the other good things that Scala offers.

I thought it was worth mentioning as a separate point; just saying "you can pattern match" doesn't say much, when it's actually a key feature to guarantee certain correctness in a program.

Pattern matching offers mainly correctness and conciseness, maybe the correctness part should have been emphasized more.

Exhaustiveness checking on pattern matches is a big thing that helps with correctness though, so it seems like it should have been in his list.