3 ms·
It may introduce a program logic bug. Or arguably, it may have already been a program logic bug that remains a program logic bug. I would be tremendously surp
by dllthomas 12y ago
It may introduce a program logic bug. Or arguably, it may have already been a program logic bug that remains a program logic bug. I would be tremendously surprised if this was close to 100% of the time, though, and even at 50% we're putting a good dent in our bugs (with, of course, plenty remaining, but that's no reason to forgo this).
- taeric 12y agoMy main hypothesis, which I of course never said, is that current static analysis tools should be able to catch the majority of these cases anyway. Especially the ones that matter. That is, a type system is not the only tool we have in static analysis. So, I'm not completely convinced that moving to a type system is the best way to go. Granted, it large part, it is clear it doesn't matter "what I think." Statically typed languages have a massive amount of support.
- dllthomas 12y agoWith the isomorphism between proofs and types, most of the stronger guarantees that any static analysis tool can give you are in some sense types. General "smell" type linting stuff, perhaps not.
- taeric 12y agoMakes sense, and I'd imagine that in large part that the theory behind them is the same. The practice of the two is different, though. Specifically, majority of the static typing regimes seem to demand a change in how software is written. Whereas most of the static analysis seem to simply provide stronger guarantees on what you are already writing. That is a huge difference.
- dllthomas 12y agoI think this is an artifact of the code you find yourself wanting to write relying on guarantees closer to the type system the static analysis tool applies (implicitly or explicitly). Some of this probably varies by domain, some by language, some by familiarity with particular type systems, and some simply by individual.
- chongli 12y agoThat is, a type system is not the only tool we have in static analysis. It's not the only tool but it's one of the better ones. It's faster, more reliable and more well-researched than almost any other tool.
- taeric 12y agoI balk at the faster claim. Specifically for existing programs. It seems that it should be far faster to run a new analysis tool over an existing codebase than it would be to rewrite said codebase in a new statically typed language.
- dllthomas 12y agoIt depends on the tool, and what options you've enabled in it. Tools have motivated pretty substantial rewrites of code-bases I've worked with.