April 2006


There has a been a raging debate lately about static vs. dynamic typing. This is due in large part to the increase in webshare for Ruby and Ruby on Rails, and increase in criticism against J2EE. For the past several months, I have been trying to get to the bottom of the value proposition of each, and determine if one or the other is clearly superior.

One of the first salvos was fired by Bruce Tate, who I interviewed back in October of 2005. A former Java proponent, Bruce moved firmly into the dynamically typed, Ruby camp. I pressed him for specific, objective reasons why he felt dynamic typing was superior. He made some points in terms of expressiveness, but it wasn’t clear to me that static typing was dead.

James Gosling in his blog was flamed relentlessly by dynamic typists for his opinions on the value proposition of static typing. Much of the criticism came when he presented some of the weaknesses of dynamically typed languages. His most compelling argument lay in what he termed the inevitability of scale, meaning that dynamically typed languages ultimately suffer from performance limitations at some point. The comments on his blog became almost religious and partisan. They did little to advance the art or even expand the dialog. Some arm chair computer scientists even questioned Goslings competence. It devolved into a rediculous spectacle.

In my recent interview with Smalltalk enthusiast Ward Cunningham, I asked his opinion. Ward admitted that he once believed that dynamic typing was the only way to go, but with the availability of high quality IDEs like Eclipse, the burden of declaring types is not as great as it once was. After a long conversation, Ward made an even more interesting observation: the question is not whether static or dynamic typing is better, it is more about who you are writing code for. If you are writing code for yourself, it really doesn’t matter what you do or how you do it. If you are writing code for someone else or with a large group, it’s a different story.

Wards observation is another dimension of scale, not of computational performance, but of the audience for code. Based on my research, dynamic typing is far from a perfect solution for all problems. Tragically, little has changed since the introduction of Smalltalk 80. In the end, I have come to the conclusion that static typing won’t go away any time soon.

Have you noticed that modern cars and trucks have complicated transmissions, but 100 year old steam locomotives don’t? Why do we need transmissions anyway? Isn’t there a better way to drive wheels? A short introduction to drive trains addresses these questions and suggests ideas for more efficient vehicles of the future.

In 1989, Pons and Fleischmann announced controversial research results called Cold fusion. During that time, I was finishing my physics degree at the University of Maryland. I was also working part time at the Institute for Research in Electronics and Applied Physics, formerly the Laboratory for Plasma and Fusion Energy Studies. Needless to say, the faculty and staff at LPFE and the physics department were very interested. What followed next was one of the most provocative experiences I have had the fortune to witness.