News for hackers. Stuff that matters.
Re:John Carmack on the importance of Static Code Analysis by DanWaterworth on Saturday December 24, 2011 @02:38AM (#3388459)
Whenever I try to write code in Haskell that produces a type error I think, "there's another bug that would have been introduced in a lesser language".
Re:John Carmack on the importance of Static Code Analysis by LearnYouALisp on Saturday December 24, 2011 @03:47PM (#3389638)
Would a type error necessarily produce a "bug" in a program?
Re:John Carmack on the importance of Static Code Analysis by DanWaterworth on Sunday December 25, 2011 @02:46AM (#3390670)
It certainly would if it was not detected before the code was deployed. Depending on how strongly typed the language is, it may cause an error at runtime, which isn't ideal, or it would go undetected until it caused a myriad of seemingly unrelated symptoms, which is much worse.

Unhandled null references are the most common type error that other languages don't catch as readily (I fairly frequently try to write code that doesn't handle the not found case in a map lookup), but there are so many times when I've tried to write code that the compiler has rejected, but that wouldn't have been picked up in other static languages.

Re:John Carmack on the importance of Static Code Analysis by LearnYouALisp on Monday December 26, 2011 @04:15PM (#3393951)
Thank you for explaining. I had thought of type errors as different representations of numbers, for example.