>>27They can statically check that ACLs/credentials are enforced, statically check SQL queries, statically enforce taint checks and so on. Some type systems are turing complete, and can check anything that eventually does compile. You can do a lot of this in C, but then implicit coercion spoils everything.
Not all type systems can do static bounds-checking but dependent type systems can. Dependent types are halting equivalent in general, but I only need to concede the point if you can supply a useful program that is halting equivalent. It hasn't been done.
Hell, Xavier LeRoy wrote a verified C compiler with his
Coq. From what I hear it admits no compiler bugs and won't emit code with UD.
Resource disposal is an odd complaint. C++ programmers and GC langs with poor type systems tend screw it up.