Why Not Just One Programming Language?

One of my favorite courses in the Computer Science program at DSU was titled “Programming Languages”. As the title suggests, this class was devoted to learning about not just different programming languages but the differences between programming languages. The class was just a semester long, and it only covered a basic overview of what there is to know about programming languages. (For more on programming languages, visit your local library.)

Knowing that there are multiple programming languages (I just told you so, remember?), one reasonably wonders, “Why not just one programming language?” My brother wondered the very same thing in an email to me, which inspired this post. As children often do, his question revealed to me a greater query that I hadn’t stopped to think about before: why NOT just one programming language? (The joke here is that my brother is in his mid-twenties.)

One reason why there isn’t just one computer language is that there isn’t just one type of computer; there are thousands of different types of computers. Computers all speak a language called “machine language“. This, essentially, is the 1s and 0s of binary. Jotting down 1s and 0s would be a terribly ineffective way of communicating with a computer, so programming languages were devised.

The different programming languages came to solve different problems. The C language, for instance, was created as a systems language. It’s goal, as a language, was to build servers and operating systems. Prolog, on the other hand, is a logic language, designed for use in artificial intelligence. SQL makes it easy to manage data in a database management system. None of these languages are useful for creating webpages easily. That’s why we have Ruby, Java, PHP, ASP.Net, and CFML (ColdFusion).

Sometimes, a programmer will like the concepts of one language, but they’ll want the syntax of another. So, they create a new language. Some languages only exist as proof that a concept is possible. Some languages are specific to the platform for which they are written. For instance, a mobile phone might have it’s own simple operating system with a special programming language used to write the cell phone’s applications, or a social networking site might develop a language in their API for developers to use to get data from that social networking site.

Perhaps an analogy is in order. Programming languages are like tools. When you’re trying to hang a painting, a hammer is better for driving a nail than a mallet. A mallet will do the job, but that’s not quite what it’s supposed to be used for. And, most importantly, you couldn’t do everything you needed to do with just a hammer. You could do a lot, and get close to almost all of it, but in the end it’s nice to have other tools in the box.

Another analogy is out of order, but I’m just that crazy. Programming languages are not like natural languages. People hear PHP, Ruby and ColdFusion, and they think of German, French, and English. RESIST THAT URGE. Programming languages are not at all equivalent to natural languages. The main reason for this is that natural languages sprang up from a human need to express the scope of intellectual thought and the breadth of expression capable in their speakers; computer languages just make computers do stuff and junk.

Using the programming language criteria above, are a French-speaking person and an English-speaking person so fundamentally different that they require different languages? Of course not. A French-speaking person is just as capable of learning English as an English-speaking person. Similarly, French doesn’t solve any problem that English can’t solve. You might be inclined to say that French poetry is much easier on the ears, or that English is a much better business language, but these aren’t properties of the language per se. English might be considered a better business tool because of its wide adoption, and French… well, I guess it IS easier on the ears, but that’s not the reason French was created.

At L&S, I usually find myself playing in ColdFusion (CFML), HTML, CSS, and JavaScript, but I’ve also played with PHP, Java, Python, and Classic ASP. On a recent project, I found myself using ASP.Net and C# for one half and CFML for the second half. In my personal time, I’ve played with Ruby and Google’s Go, among others. I’m not listing this all out to impress you, but let’s be honest; some of you are really impressed. I’m listing these languages to show just how varied the Internet landscape is right now. In fact, looking at this list, I think my list of languages might be light for a web programmer these days. No Perl? No Clojure? No Scala? No Processing?

As servers get better at deploying (and virtualizing) the ability to utilize these languages in an integrated environment, web developers are getting more interested in picking the right tool for the job. Better server performance means giving developers more tools to play with and utilize. That, in turn, means faster, more efficient websites and, regrettably, a whole lot of developer ego.

Those guys can get pretty insufferable. Trust me.

One Reply to “Why Not Just One Programming Language?”

  1. Hi Miles,

    And your list of examples leans heavily towards interpreted languages and web programming. When you add scientific computing where speed and precision are everything, or business programming where proper rounding matters a lot, or data acquisition and control where FAST matters, things get even more complex.

    PS: Happy birthday.

Comments are closed.