I have been a fan of statically typed languages for many years. I learned the lesson the hard way, using C. Too many systems broke down due to silly typing errors. When C ++ came out, I was an avid supporter and a violent follower of strong typing. I scoffed at smalltalkers who nagged about losing flexibility. Reliability, after all, was far more important than flexibility. And besides, we could keep our software flexible and statically typed if we simply follow good dependency management principles.
Four years ago I joined XP (Extreme Programming methodology). I loved the emphasis on practicality, which she added to software development. I also liked the testing focus. Since then, I got infected with the idea of testing. I can no longer imagine creating code without using TDD (test driven development). I can’t even imagine that I don’t have full test coverage to keep my designs safe.
About two years ago, I noticed something. I became less and less dependent on typing in terms of reliability. My unit tests prevented me from making typing errors. The more I depended on unit tests, the less I depended on reliability based on typing in Java or C ++ (my languages).
I thought the experiment went well. So, I tried to write some applications on Python, and then on Ruby (a very famous dynamically typed language). I was not very surprised when I discovered that typing errors simply never occurred. My unit tests allowed me to keep my code strict and not deviating from the rules. I just didn’t need static typing on which I had depended for so many years.
')
I also realized that the flexibility of dynamically typed languages makes writing code much easier. Modules are easier to write and easier to change. There are no issues related to the assembly. Life in the world of dynamic typing is fundamentally easier.
Now I am programming in Java again, then the projects I work on are asking for it. But I can not help but admit that I feel the craving of dynamically typed languages. I would like to program on Ruby or Python, or even Smalltalk
Does anyone else feel something like that? As more and more people use TDD (which I believe is inevitable), will they feel the same way that I do? Will we all program in dynamically typed languages by 2010?
April 26, 2003
Robert Martin, a distinguished software developer,
Author of the Agile Manifesto, author of the principles of SOLID,
Perfectly swearing in C ++ and Java :)