Re:Eric Lippert is leaving Microsoft
by seanmcdirmid on Thursday November 29, 2012 @09:37PM
(#4851556)
Static analysis is about performing heuristical non-local analysis on a code base to find bugs. We aren't talking about modular type checking that is performed by the compiler and explicitly enabled by the programming language design.
If you eliminate potential bugs to be found, static analysis is devalued significantly. So while static analysis may seem necessary for C++ code (very buggy, not much safety), it has less value for Java or C# code, where the easy-to-detect bugs and the remaining bugs are much more difficult to find.
Really depends on the type of code you are writing. If you're writing a Mars Rover, you're probably not using a single dynamic feature and static analysis works quite well in this case. So long as you're writing 'dead' software, you're better off with static analysis.
As soon as you try to write living software, that is, software able to evolve over time without restarting, static analysis goes out the window. Design by contract and test suites are your friends in this case.
(1) almost all compiled language systems do _some_ static analysis. For example, many compilers and linkers do dead code elimination, and Java and C# must, by spec, do static analyisis to prove that variables won't be used before set.