| Some arguments I have seen for dynamic typing: - Code is shorter and potentially easier to read. - While static typing can identify some bugs at compile time, these are usually the easiest bugs to find regardless of the language you use. The hard bugs -- the ones not caught by the compiler -- only become obvious through testing. So if you have a good suite of tests, you will find both classes of bugs, whether or not you use a statically typed language. - In a dynamically typed language, you spend less time wrestling with the typing system -- instead of casting in C or Java, doing long template-related declarations in C++, or convincing ML or Haskell that your program should be allowed to run. - And, more theoretically, a statically typed language limits the space of programs that you can write. While most of the programs disallowed by static typing are buggy, some are useful, and a statically typed program with the identical useful functionality is longer. Of course, static typing has its benefits as well. It's the reason our fastest languages are as fast as they are, and it's a comforting safety net, especially in large projects. |