Re: Are Dynamic Languages Going to Replace Static Languages?
Posted: Jan 18, 2008 5:47 AM
Even with perfect TDD, static typing is still very important for two reasons:
1) Library development (and usage)
If you own your entire application from the command-line arguments to the
final output, then TDD gives you all of the protection that you need.
However, if you are only developing a class library with a very large
interface for clients to use, then static typing is needed since users will
not properly TDD their code. In my experience, while novice programming hate
dealing with compile errors, they hate opening a debugger even more and it is
very hard to produce good runtime error messages. Therefore, compile-time
errors are still to be preferred to runtime errors.
In my opinion, despite what everyone says about C++, the major motivation for
strong motivation for static typing is high performance, not safety. The fact
that C++ has raw pointers tells you that raw C++ is not all that concerned
As for TDD, it can be very hard to write isolated tests for some types of
code. For example, if you are using Python to write scripts to direct the
build process for an expensive build, it is very hard to make a small fast
test that will run quickly. Instead, I will run a incremental rebuild that
takes 10 minutes and then the Python script crashes because I misspelled the
name of a single variable very late in the process. If this had been Java
code, I would have found this out in 5 seconds.
My main reason for using Python for this project is that it is free, it is
available everywhere, it has better text processing and it is better than