Why Are There So Many Programming Languages?
Recently, an outsider to the programming world offhandedly asked me a question: “why are there so many programming languages?”
This gave me pause for a moment. When you’re steeped in the programming world, you just kind of take this for granted. In that sense, it’s like me asking you right now, “why are there so many spoken languages on Earth?”
But I reflected a little further on it. And I decided it would make good fodder for this blog—one that answers questions asked by newbie and aspiring programmers. We answer questions about whether software engineers are happy and whether programmers should blog. Why not this question?
So let’s look at why there are so many programming languages.
First of All, Are There Really a Lot of Them?
Before answering the question outright, we should probably look to quantify the vague claim “a lot.” How many programming languages are we really talking about?
Is five a lot? 10? 20?
I went over to Wikipedia’s list of programming languages to see if I could give you a number. And I can.
There are 68 programming languages… that start with the letter “S.” I’m not going to count the entire page, but based on “S” you can easily extrapolate that we’re talking hundreds of programming languages.
And, depending on how you define “programming language,” one might argue that this understates the number out there. After all, this list omits markup languages like HTML and XML. (Some consider these programming languages, though I don’t, myself.)
So yes, there really are a LOT of programming languages. Now we just need to talk about why.
Programming Languages Are Products
For the first answer to the question, “why are there so many programming languages,” I’ll go a route you might not have expected. Instead of giving a nod to the wisdom of some grand, implied programmer consortium, I’ll talk simple human nature.
In a sense, asking “why are there so many programming languages” is like asking “why are there so many soda flavors?”
Do we really need whatever flavor “Mountain Dew Code Red” is in the world?
There are a lot of programming languages because programming languages are, in reality, products. It might seem weird to think of them this way, but you should start.
They have a lot of the things that you’d associate with any other sort of products:
Hopefully, you get the idea.
Now, I’m not saying that all programming languages are commercially sold or part of for-profit ventures. But I am saying that they’re all products of a fashion.
And, like any products, this means that they come to exist and die out or survive on the basis of market forces. Just like soda flavors.
Someone gets an idea for a language, builds it, and puts it out there in the world. If it gains steam and catches on, it occupies market share. If not, it dies off in obscurity.
And, apparently, we in the programming world are enthusiastic about a lot of variety in the market. Like soda drinkers.
Programming Languages Fill Different Niches and Scratch Different Itches
Alright, so in a sense, I’ve just kicked the can down the road a little bit. There are so many programming languages because we programmers, as a collective, apparently like having a lot of different languages.
But why is that?
Well, I’d say there are two primary reasons, and the first one is that different languages have evolved to have many subtly different purposes (I’ll get to the second reason in the next section).
If you do a search for “types of programming languages,” you’ll find a decided lack of consensus on just how to categorize these things. Here is a sampling of the divisions you’ll find:
- Object-oriented vs. functional vs. structured.
- Declarative vs. imperative.
- Strongly typed vs. dynamic.
I could go on, but I’m not looking to teach you foundational Computer Science 201. The point is to illustrate that these languages actually have a lot of differences, right down to their very nature.
And the result is that people use them for many different, often niche, purposes.
- There are so-called markup languages that help you lay out user interfaces.
- Scripting languages allow you quick automation capability to make your life a little faster.
- Functional languages give you a nice way to write massively parallel code.
- Object-oriented languages lend themselves to enterprise software development.
And these are just some of the major ones. There are much more niche ones that statistics professors use or what have you.
So another big driver for so many programming languages is that there are so many different needs for programming. And those needs help determine which programming language you should know.
Programmers Love Reinventing Wheels
As I mentioned not long ago, I believe there are two primary drivers for programmers tolerating and even loving so many languages. The first reason was the diversity of needs in the programming world.
But the second reason is that programmers really just kind of love reinventing the wheel.
Don’t believe me? There’s actually a developer-specific name for this phenomenon. It’s called “not invented here syndrome.”
Not invented here syndrome (NIHS) is a slightly tongue-in-cheek name for the tendency of both individual developers and entire organizations to reject suitable external solutions to software development problems in favor of internally developed solutions.
In other words, we programmers look at the 14 suitable solutions that already exist and conclude that none of them do quite what we want, exactly how we want it. So we create solution 15.
Programming languages are maintained and created by programmers. All of us in this line of work spend all day every day dealing with at least one programming language. We’ll complain about it, file bug reports, ask for new features, get excited and get disappointed as news of changes come out, and generally, we invest a lot of mental energy.
So it’s not a huge leap from there to “you know what, we should just build our own!” It’s what we programmers do with every other kind of software when left to our own devices.
Oh, and Specific Corporate Interests As Well
So far I’ve mainly been talking about market forces from the demand side of things. A lot of programming languages exist because we, as developers, both like to use a lot of different tools and also create them.
But don’t sleep on the historical role of corporations in creating languages and fragmenting the market.
Can you imagine that, given its current ubiquity, it was:
- Carefully designed to be fit for purpose and painstakingly tested over years, or
- hastily conceived in just a few months?
The correct answer is, (3) none of the above, it was actually slapped together in 10 days.
Why so fast?
Well, at the time (the mid-90s), Netscape and Microsoft were in a furious arms race later known as the “browser wars” and both were trying to push out an approachable, browser-based programming language.
Why this specific story? To drive home the point that software companies—particularly large and influential ones—create and market programming languages for the sake of their own strategy and market position.
So Why Are There So Many Programming Languages?
Now that you’re starting to have a good picture of the forces responsible for the massive fragmentation in programming languages, let’s close on somewhat of a philosophical note. Why are there so many programming languages?
It’s partially because of tech companies, and partially because of software developers and their love of reinventing wheels and consuming reinvented wheels. But, in a sense, it’s actually broader than that.
The software world is a rapidly changing landscape, and it’s one that’s risen from obscure to “eating the world” in the course of the last 40 years. And within that software world, you have programming languages. And programming languages, at their core, aren’t really as much about telling a machine what to do as they are about telling other programmers what you told the machine to do.
Programming languages are vehicles that software developers use to communicate.
And so if you look at this world, exploding in size while being in a constant state of flux, it stands to reason that communication inside of it would be unpredictable, complex, varied, and hard to track.
So why do we have so many programming languages? Because we have to keep inventing new ones just to keep up.
PS: If you like video format, I also recorded a video tackling this same subject:
This post was written by Erik Dietrich. Erik is a veteran of the software world and has occupied just about every position in it: developer, architect, manager, CIO, and, eventually, independent management and strategy consultant. This breadth of experience has allowed him to speak to all industry personas and to write several books and countless blog posts on dozens of sites.