Why Not Just One Programming Language?

One of my favorite courses in the Com­puter Sci­ence pro­gram at DSU was titled “Pro­gram­ming Lan­guages”. As the title sug­gests, this class was devoted to learn­ing about not just dif­fer­ent pro­gram­ming lan­guages but the dif­fer­ences between pro­gram­ming lan­guages. The class was just a semes­ter long, and it only cov­ered a basic overview of what there is to know about pro­gram­ming lan­guages. (For more on pro­gram­ming lan­guages, visit your local library.)

Know­ing that there are mul­ti­ple pro­gram­ming lan­guages (I just told you so, remem­ber?), one rea­son­ably won­ders, “Why not just one pro­gram­ming lan­guage?” My brother won­dered the very same thing in an email to me, which inspired this post. As chil­dren often do, his ques­tion revealed to me a greater query that I hadn’t stopped to think about before: why NOT just one pro­gram­ming lan­guage? (The joke here is that my brother is in his mid-twenties.)

One rea­son why there isn’t just one com­puter lan­guage is that there isn’t just one type of com­puter; there are thou­sands of dif­fer­ent types of com­put­ers. Com­put­ers all speak a lan­guage called “machine lan­guage”. This, essen­tially, is the 1s and 0s of binary. Jot­ting down 1s and 0s would be a ter­ri­bly inef­fec­tive way of com­mu­ni­cat­ing with a com­puter, so pro­gram­ming lan­guages were devised.

The dif­fer­ent pro­gram­ming lan­guages came to solve dif­fer­ent prob­lems. The C lan­guage, for instance, was cre­ated as a sys­tems lan­guage. It’s goal, as a lan­guage, was to build servers and oper­at­ing sys­tems. Pro­log, on the other hand, is a logic lan­guage, designed for use in arti­fi­cial intel­li­gence. SQL makes it easy to man­age data in a data­base man­age­ment sys­tem. None of these lan­guages are use­ful for cre­at­ing web­pages eas­ily. That’s why we have Ruby, Java, PHP, ASP.Net, and CFML (ColdFusion).

Some­times, a pro­gram­mer will like the con­cepts of one lan­guage, but they’ll want the syn­tax of another. So, they cre­ate a new lan­guage. Some lan­guages only exist as proof that a con­cept is possible. Some lan­guages are spe­cific to the plat­form for which they are writ­ten. For instance, a mobile phone might have it’s own sim­ple oper­at­ing sys­tem with a spe­cial pro­gram­ming lan­guage used to write the cell phone’s appli­ca­tions, or a social net­work­ing site might develop a lan­guage in their API for devel­op­ers to use to get data from that social net­work­ing site.

Per­haps an anal­ogy is in order. Pro­gram­ming lan­guages are like tools. When you’re try­ing to hang a paint­ing, a ham­mer is bet­ter for dri­ving a nail than a mal­let. A mal­let will do the job, but that’s not quite what it’s sup­posed to be used for. And, most impor­tantly, you couldn’t do every­thing you needed to do with just a ham­mer. 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 anal­ogy is out of order, but I’m just that crazy. Pro­gram­ming lan­guages are not like nat­ural lan­guages. Peo­ple hear PHP, Ruby and Cold­Fu­sion, and they think of Ger­man, French, and Eng­lish. RESIST THAT URGE. Pro­gram­ming lan­guages are not at all equiv­a­lent to nat­ural lan­guages. The main rea­son for this is that nat­ural lan­guages sprang up from a human need to express the scope of intel­lec­tual thought and the breadth of expres­sion capa­ble in their speak­ers; com­puter lan­guages just make com­put­ers do stuff and junk.

Using the pro­gram­ming lan­guage cri­te­ria above, are a French-speaking per­son and an English-speaking per­son so fun­da­men­tally dif­fer­ent that they require dif­fer­ent lan­guages? Of course not. A French-speaking per­son is just as capa­ble of learn­ing Eng­lish as an English-speaking per­son. Sim­i­larly, French doesn’t solve any prob­lem that Eng­lish can’t solve. You might be inclined to say that French poetry is much eas­ier on the ears, or that Eng­lish is a much bet­ter busi­ness lan­guage, but these aren’t prop­er­ties of the lan­guage per se. Eng­lish might be con­sid­ered a bet­ter busi­ness tool because of its wide adop­tion, and French… well, I guess it IS eas­ier on the ears, but that’s not the rea­son French was created.

At L&S, I usu­al­ly find myself play­ing in Cold­Fu­sion (CFML), HTML, CSS, and JavaScript, but I’ve also played with PHP, Java, Python, and Clas­sic ASP. On a recent project, I found myself using ASP.Net and C# for one half and CFML for the sec­ond half. In my per­sonal time, I’ve played with Ruby and Google’s Go, among oth­ers. I’m not list­ing this all out to impress you, but let’s be hon­est; some of you are really impressed. I’m list­ing these lan­guages to show just how var­ied the Inter­net land­scape is right now. In fact, look­ing at this list, I think my list of lan­guages might be light for a web pro­gram­mer these days. No Perl? No Clo­jure? No Scala? No Pro­cess­ing?

As servers get bet­ter at deploy­ing (and vir­tu­al­iz­ing) the abil­ity to uti­lize these lan­guages in an inte­grated envi­ron­ment, web devel­op­ers are get­ting more inter­ested in pick­ing the right tool for the job. Bet­ter server per­for­mance means giv­ing devel­op­ers more tools to play with and uti­lize. That, in turn, means faster, more effi­cient web­sites and, regret­tably, a whole lot of devel­oper ego.

Those guys can get pretty insuf­fer­able. Trust me.

One thought on “Why Not Just One Programming Language?

  1. Hi Miles,

    And your list of exam­ples leans heav­ily towards inter­preted lan­guages and web pro­gram­ming. When you add sci­en­tific com­put­ing where speed and pre­ci­sion are every­thing, or busi­ness pro­gram­ming where proper round­ing mat­ters a lot, or data acqui­si­tion and con­trol where FAST mat­ters, things get even more complex.

    PS: Happy birthday.