Re:Scala: the Case for Correctness
by rld on Tuesday October 14, 2014 @11:09PM
(#8457009)
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.
[ Parent
| on HN ]
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.
Re:Scala: the Case for Correctness
by imanaccount247 on Tuesday October 14, 2014 @11:20PM
(#8457032)
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.