There seems to be a bit of debate right now in the blogosphere about static versus dynamic languages.
If you use emacs as your IDE then sure you're gonna find a dynamic language way faster to hack code. However anyone who's really got to grips with using a modern refactoring & auto-completing IDE like eclipse or IDEA will realise how productive and fast a statically typed language really can be - the 'overhead' of static typing can actually make development faster. I find it hard to imagine being as productive in a dynamic language - there's so much the IDE can do for you if your code is statically typed.
e.g. Most code involves method calls and argument passing; in a statically typed language the IDE knows the names of all methods, argument parameters and types that are available. Plus its easy to navigate to the javadoc & definition etc.
Through auto-completion, extensive incremental syntax analysis and refactoring support, the IDE helps make me very productive - so basically I think I'm agreeing more with the views of Carlos in this area.
I agree with the idea that we all need really good unit tests and TDD. However I don't really buy the argument that using a dynamic language and writing more unit tests to catch what a statically typed language does for you makes you that much more efficient if you use a decent IDE and a statically typed language.
I can't help think that its just less work to write code using a good IDE and a statically typed language since you don't need to manually write extra tests to check that every method call works on every object you think you should be invoking it on and you haven't messed up all the argument types. With a statically typed language you still need to write good unit tests but at least you've less to test - you can just focus on testing behaviour rather than that you're invoking the right methods on the right objects.
Having said all of that, it might be a good idea to use dynamic languages to write the unit tests. Its certainly worth some experimentation.
e.g. for Java developers, maybe unit tests could be written faster in Jython? Often unit tests are 'scripts' and so might well suite a more dynamically typed language. Though I do like having refactoring support to auto-detect and auto-correct issues when refactoring, which we'd loose. But it might be useful for writing lots of the more mundane styles of unit tests?
5:05:09 PM
|