Re:John Carmack on the importance of Static Code Analysis
by joeyh on Saturday December 24, 2011 @12:14PM
(#3389202)
I agree, however I find keeping good code coverage in tests is still important in haskell. The other day I had to fix a bug that I had introduced while running hlint in a module that was not being tested. Oops.
WRT hlint, I've not seen it point out any actual bugs in code, it only finds ways to golf it, in my experience. It doesn't even find a few common performance impacting mistakes like length foo > 0 ==> not (null foo). OTOH, its quite a beautiful tool, especially if you look at the implementation of checks, which is this simple and beautiful:
WRT hlint, I've not seen it point out any actual bugs in code, it only finds ways to golf it, in my experience. It doesn't even find a few common performance impacting mistakes like length foo > 0 ==> not (null foo). OTOH, its quite a beautiful tool, especially if you look at the implementation of checks, which is this simple and beautiful:
error = take (length x - 1) x ==> init x