Only a perfect type system is capable of preventing only wrong things, and allowing all correct things. In the mean time, we're left with things that are slightly less perfect. Like OCaml, Haskell, SML, Java, Smalltalk, Ruby, Javascript, Python, PHP, Prolog, and everything else that even attempts a type system.