The Language Wars
Tuesday, May 06, 2008   

Anybody who's ever seen Full Metal Jacket will remember the U.S. Marine Corps Rifleman's Creed:

This my rifle. There are many like it but this one is mine. It is my life. I must master it as I must master my life. Without me my rifle is useless. Without my rifle, I am useless. I must fire my rifle true. I must fire straighter than the enemy who is trying to kill me.

But what most people don't know is that programmers live by a similar creed, albeit one that requires less courage:

This is my programming language. There are many like it, but this one is mine. It is my life. I must master it as I must master my life. Without me my language is useless. Without my language, I am useless. I must code my language true. I must code straighter than the enemy who is trying to take my job.

If you're a programmer, you're no stranger to the Language Wars.

  • C# vs. Java
  • C++ vs. C++/CLI
  • PHP vs. Ruby
  • VB.NET vs. C#

And if you've done any time "in country" then you know what there's only one way to treat programmers of other languages: with poisonous rancor, sadistic undercutting, and general disdain.

Right?

Everybody knows that Visual Basic programmers are inferior, because Visual Basic for the longest time didn't support object-oriented programming, or many of the abstractions that first-rate programmers require.

Right?

Everybody knows that C++ programmers are dinosaurs, clinging to an outmoded development paradigm, pointing out the useless performance of their language in an era when hardware has made most performance concerns moot.

Right?

And as for PHP programmers... don't even get me started.

No matter who you are, or what language you program in: your stuff is better than the other guy's stuff. At least, that's the unspoken (or explicitly stated) assumption among many software developers, especially developers of the "guru" variety.

It's also an assumption which is guaranteed to make you a poor programmer.

I've remarked before that technology is really just a way to help people instantiate ideas in a concrete form, through the process of what I like to call "reality engineering". Every programming language ever invented is a means to that end, as is every screwdriver. So what do we achieve by religiously worshipping one particular programming language to the exclusion of all others?

We severely limit our options for the fluent and intuitive expression of our ideas.

In game terms, this would be like sitting down to a game of chess, across from a noted Grandmaster...

...and deciding, "Eh. I'm not going to use my Bishops. I don't like Bishops, my organization doesn't like Bishops, my fans don't like Bishops. Rooks are much stronger."

There are few technical decisions which are more important than the choice of language. It's not enough to choose Language X because your organization is a political advocate for Language X. It's not enough to choose Language X because that's what the head architect wants to use. Choosing the right language is so helpful, and choosing the wrong language is so expensive, that the decision has to be made on the basis of its technical merits alone. What's more: the choice of language has to be re-evaluated for every new project in your pipeline.

Otherwise you're costing yourself and your organization time and money.


Posted by James Devlin   3 comment(s)

SEARCH

COMMENTS

I just stumbled upon your site, and really enjoy reading your work. I am fairly new as far as programming as a career (I graduated about a year ago). I completely agree with you about choosing a language to fit the needs of a project and not picking it just because.

Although to me it is somewhat difficult to compare languages. Where do you start? I am sure it is due to my inexperience in the field, but how would you do it? I would be interested to read a blog about how to choose the language that best suits the project at hand.

Thanks again for your blog!

Jacob on 5/9/2008 7:53:39 PM (56 days ago)

Jacob -

The best advice I know of for that is simply to learn lots of languages. Ideally, lots of different languages, with different characteristics. (The way I've found useful for doing that is to read enough about the language to get a sense of what it's good for, pick a project that seems like a good fit, and write it with lots of looking at the man page while you do it.)

This also has other advantages, in expanding the ways that you think about how programs are structured. For a simple example, back when I was writing programs in Fortran 77 (which is the version of Fortran that actually deserves the bad reputation; later versions are vastly better), I remember writing a nice simple recursive routine for a key cornerstone of a program. Thing is, Fortran 77 doesn't actually support recursion, so I had to manually create a variable stack and so forth -- but, because I knew what recursion was and how it worked from writing programs in languages that did support it, it was pretty simple to map that into something that worked in Fortran 77. There are many, many other things like that, and the more you learn, the more you can do.

Brooks Moses on 5/10/2008 3:21:10 AM (56 days ago)

I love this post. It's so very true and something I've have already aligned my outlook with when it comes to programming. The more the merrier!

Jacob: I had an experience just yours when trying to come up with a good solution to formalizing the use of assertions in a language that didn't offer them. The point being, the more well-traveled a programmer you are, the more expressive and creative you can be in other environments where someone with less experience might be a bit more stifled.

Joel Spolsky also wrote to this end I think. I wish more people had this point of view, but honestly it really just comes down to how passionate people are when it comes to their craft. If a single programmer just really doesn't care that much about what they're doing, you can't expect them to just jump outside of their relative zone of comfort to find new learning experiences.

But if you find/meet those people, hold onto them in whatever capacity you can!

shawn on 5/25/2008 5:55:09 PM (40 days ago)

Comment on this post:

Thanks for your interest in Coding the Wheel. All fields are optional.