Dynamic Languages

I read an article over at ONJava today titled ”Technologies to Watch: A Look at Four That May Challenge Java’s Development Dominance”. I was going to call it an ‘interesting’ article, but it really wasn’t that interesting. In fact, the author pretty much lost my attention when describing the first of these emerging technologies to watch, dynamic languages. The author started by saying that “dynamic languages can be much more productive than static ones like C++ or Java”. Statements like that make me cringe.

I think that it’s important in software development to use the right tool for the job. So if you’re writing a quick web app to generate [or in some cases, cheat at] hockey pool scores then I don’t think it makes a lot of sense necessarily to use Java Servlets. You could use it, but it’s not a production application, it’s going to be used internally, and you’ll likely going to make changes as you go along. So I would say that Perl (or some other similar dynamic language) is probably a good choice. That’s not to say that Perl can’t be used for production apps, so don’t start flaming me for that.

Where I have a real problem is that people generalize and equate writing actual lines of code with productivity, without thinking of the software writing process as a whole. The language mentioned in the article is Ruby. The author mentions that types in Java are static so you have to “you must create and compile a full program” and goes on to say that that because with Ruby types are dynamic, “you can just start typing and go.” The author is implying that with Ruby I will be way more productive. But the problem with the “type and go” mentality is that unless you are a disciplined programmer, you will do just that. You’ll type and go. And when something doesn’t work, you’ll try typing something else and go again. And again.

When you are forced to compile and link and whatever else, the type and go method becomes less productive. Agreed. So don’t do that. Instead, stop and think about what you are trying to accomplish, what happening instead and why the difference between the two. And how changes in one spot of the code will affect other things. I’m talking about a true understanding of the programming trade. You can’t do that if you keep thinking that this next change will work “this time.” Sure, we’ve all done it, but that doesn’t make it right. And I don’t know for sure but I’d be willing to bet that while the coders so-called “productivity” might be worse when using Java (or other such static language), the productivity of the development team over the whole software process is likely well above that of the dynamic languages. It’s not so great if the coders are cranking out the code but have to do things over and over because the code fails to work as expected during the testing phases.

Of course, all that said, you also have to factor in the programmers themselves, for if you have the very best (and disciplined) coders working in Ruby and poor coders doing the same thing in Java, it’s very possible that the Ruby project will be more successful faster. But I think as a whole, you won’t find too many production, enterprise applications written with dynamic languages. Flame if you want, but you’ll make your case a lot better if you write some code and show me.

Fri, 04 Nov 2005 11:30 Posted in

Comment Dynamic Languages


RSS