Not that long ago my wife asked me why there are so many programming languages. I gave her an answer, but that question has been bouncing around in my head because there are so many different answers, yet of all of the many I’ve been kicking around, none of them really seem complete.
Before college I had already studied a few programming languages (ignoring markup): basic, visual basic, C/C++ and the one in my TI-81 calculator, TI-Basic. (The TI was the weakest but had been most useful in high school math classes). BASIC was cool because for a time it came in every PC, packaged with MS-DOS, and as a kid I thought it was really cool to get these adventure books from the library that came with little Q-Basic programs that you would type in to see something that went alongside the story. So Visual Basic was the next natural choice when I first got my hands on Microsoft Visual Studio. But I was always frustrated by the idea that you had to have something (an interpreter) installed in order to run a Visual Basic program. To me that meant it wasn’t real programming, so I studied C++, which also came in Visual Studio.
I studied five (and a half) other languages in college: Common Lisp, Prolog and C/C++, SQL and Assembly Language.
With these six languages, you can start to discuss why there are so many computer languages out there. I would break it down into these main reasons:
- Improvement – Perhaps the best reason for a new programming language. Many are created to be better than the ones that came before. C++ is an improvement on C (adding object orientation), C was an improvement on B, which was an improvement on FORTRAN and a number of other languages. Each new language improves by adding in new features or by removing bad ones. The goal of any programming language is clarity and efficiency. And of course, every language is a spectacular improvement from their greatest ancestors: assembly and machine language.
- Specialty – Some languages are created for a specific purpose. Lisp, for example, was created in 1958 for use in artificial intelligence research. The name reflects the idea that it is so good at dealing with lists, or “LISt Processing”. SQL is a language that is used extensively for working with databases and would never be expected to power an application.
- Ego – this one is my theory. What programmer hasn’t dreamed of improving the languages they are stuck programming? As I’m sure most biologists would love to find and name new species, many computer geeks out there would love to create their own languages. It’s easy enough to do using Lex and Yacc. The hard part is creating a language that is worth the time and effort and then getting other people to use it. I’m sure a thousandfold languages have died of obscurity for all the ones that have succeeded.
- Learning – one way to learn about computer languages is to create one. Just like any other form of programming, you only really learn the subject when you dig in to it and experience first hand all of the choices you have to make and when you make a lot of mistakes. The other side of this is teaching, some languages have been written purely for the sake of teaching others how to program.
A more interesting question than why are there so many languages, is why do some languages survive and others die out? When was the last time you were asked to program in COBOL or FORTRAN? Pascal? Ada?
In researching this entry, I pinned a few cool infographics on my Infographics Pinterest board.