Some programming languages become popular. Others don’t. Why is that? Are the popular languages better than the obscure ones? It’s more complicated than that, so let’s grab a long stick and poke at this hornet’s nest.
To start off on the wrong foot, there isn’t really a consensus on the popularity of programming languages. There are various efforts to rank them based on Google searches, StackOverflow questions, GitHub repositories, and so on.
Depending on which heuristics you consider and how you weigh them in your ranking, you’ll end up being biased in favor or against certain languages.
For example, there is an obvious correlation between the popularity of a programming language and the number of relevant questions on StackOverflow. However, all things being equal, this metric will penalize simpler and better-documented languages.
If you take GitHub repositories as an indicator of popularity, you’ll penalize languages for which code tends to be hosted elsewhere. The same applies for languages that are not widely used in the open source world, of course.
Thankfully, we don’t need exact rankings in order to have a meaningful conversation. Let’s just agree that the ballpark definition of “popular”, as far as this article goes, is making the cut in the top 20 on the TIOBE index or the Redmonk index.
Are popular programming languages better?
Popular languages are not necessarily better than less popular ones.
I would argue that the Lisp family is, in many respects, one of the best family of languages. It is, by our definition above, marginally popular at best.
Without any intent of starting a flame war, I feel obliged to point out that PHP is one of the most popular programming languages in the world.
Technical merit alone doesn’t separate the winners from the losers. Let’s see what does.
Several of the most popular languages in the list(s) are what I would define as default languages.
Default languages are the natural go-to language for a given platform.
- C is the default language for Unix system programming;
- SQL is the default query language for relational databases;
- Java is the default language for Android apps;
- Swift (and before that, Objective-C) is the default language for iOS and Mac applications.
Default languages are popular because anyone who is interested in developing in a given ecosystem will simply default to them.
They have a massive advantage over alternative languages.
Using something else requires research and effort. To borrow an example from within the tech world as well, BASH is far more popular than the arguably superior ZSH and FISH shells, simply because it’s the default on so many *nix systems.
Languages backed by tech giants
Another category of popular languages are languages backed by tech giants.
Note that it is not merely sufficient to be backed by a large tech company. Think Google and Dart (particularly prior to Flutter). No, to make it popular, the company must put their weight behind the language.
Microsoft pushed C# so hard that it virtually became a default language for Windows programming.
Large standard libraries
With the exception of select default languages that rely on their positional advantage, most popular languages have a large standard library.
You need to have one in order to appeal to the initial seed group of developers who will, in turn, help you grow the ecosystem of libraries.
Python is the perfect example of this. Its “batteries included” philosophy made it useful from a very early stage. A great seed for the vast library ecosystem that would develop.
Often new languages that have emerged and become popular in recent years have leveraged existing platforms as a mean to provide a large standard library and a well-sized ecosystem of libraries right off the bat.
The most common examples are languages for the JVM, such as Scala, Clojure, and Groovy.
Give it a few more years and Elixir might become an example of a popular language on BEAM (the Erlang Virtual Machine).
Sometimes programming languages become popular because they provided an answer to a particular paradigm shift within the industry.
Paradigm shifts don’t occur too often, but when they do, they open the door to new languages.
Right now, functional languages have a shot at widespread adoption. In part, because they work so well within an increasingly concurrent and parallel world.
Which bring us to another reason why some languages succeed in terms of adoption.
Having an absolute killer application within a given domain.
Ruby is the poster child of this. Outside of Japan, it was a largely ignored language for a decade or so before it started to gain traction elsewhere.
Then Rails came along – and it was a very compelling proposition for web development. People were impressed enough that they were willing to study this little-known language called Ruby, simply because of Rails.
And when they did, they discovered what a nice little language it was. Its technical merits were fundamental to its adoption (and the reason why DHH picked it up for Rails), but not sufficient on their own.
It’s not an overly common scenario, but languages which provide a better answer to a specific problem within a popular domain can experience huge gains in popularity.
What else helps? Marketing.
Marketing helps. A community that doesn’t shy away from good technical marketing will undoubtedly help the language become more popular.
Note that marketing is a very encompassing term. Great documentation is good marketing. Not having to spend an hour installing things just to get started is arguably part of your approach to marketing.
Being accepting, inclusive, and welcoming to newcomers is good marketing. Blogging, organizing conferences, giving speeches at other conferences, writing great books, are all good examples of things a marketing-oriented community does.
What else? Familiarity.
Familiarity is very important. If your programming language is radically different from anything that the majority of developers are used to, it will struggle to become widely adopted.
So it has to toe the line. It has to be innovative enough to make it worthwhile, but familiar enough that it won’t immediately induce a negative gut reaction the moment a new developer approaches it.
This is a struggle numerous Lisp languages have had to face. Most developers are familiar with the Algol/C syntax, however, S-Expressions are somewhat scary and foreign to many.
Because of this, although functional languages have a shot this time around, it won’t be an easy sell.
Anything else? Time.
Programming languages don’t become popular overnight. It takes years, no matter how you slice it.
Most languages take at least 10 years to become widely adopted. Adoption rates are getting faster in recent years, but this process still takes quite a while (several years).
The most obvious exception is Swift, with its meteoric rise over the course of just a couple of years of its introduction. Not only Swift is backed by Apple, it was also made into a default language for one of the most popular development ecosystems in the world.
So if you’re a programming language developer or an early adopter of a language that you wish to see become more popular, be patient. You’re in this for the long haul.
Popularity ain’t easy
It’s really hard to make a programming language popular.
The competition is fierce, with so many valid options available to developers.
As we asymptomatically approach all that programming languages can be, it is even harder to create something that’s so very much better than it’s worth making the leap to.
Developers need compelling and convincing reasons to jump ship or even just consider investing time in your language and community.
Consider for a moment why a programmer would want to learn a language that is new to them:
- To get or keep a job;
- To become more productive and/or write better software;
- To develop a new category of applications;
- To learn a new paradigm.
If your language can satisfy at least some of these needs, it will have a chance. But this only buys you admission to the race.
In summary, I believe these are the key factors to consider:
- Being a default language for a popular ecosystem;
- Being backed and promoted by a tech giant;
- Having a large standard library and/or targeting a popular VM (e.g., JVM, unless it’s a system language like Rust);
- Fully embodying a new paradigm shift;
- Being very useful in a particular domain, like Ruby did through Rails back in 2005;
- Having great documentation, guidance for newcomers, tools, editor integration, and in general removing any instrumentation obstacle that makes getting started with your language difficult;
- Fostering a welcoming and inclusive community that encourages sharing, marketing, and evangelism;
- Having a somewhat familiar syntax that is easy to read, write, and teach;
- Being active and developed for several years;
- Providing technical innovations that lead to productivity and more maintainable code;
The first two are out of the question for most languages, and even then, few languages will meet all of the remaining requirements.
Even embracing just a few of these should, however, be enough to grant your language a chance at becoming mainstream.
Failing that, you might still be left with an active, niche language that will survive and be appreciated by many developers for decades to come.
- It’s worth noting that this same question can be posed in wildly different fields. What makes certain musicians popular? How about cars? In this article, though I will discuss my thoughts on programming languages in particular. ^
- An alternative heuristic is to consider a language as being popular if there are multiple current books on the subject published by the most prominent tech publishers such as O’Reilly, Wrox, The Pragmatic Bookshelf, Addison-Wesley, No Starch, Manning, etc. ^
- In part, because we have come to appreciate some of their features that were incorporated in more mainstream languages. ^
- Whatever you think of Rails today, it has significantly affected the world of web development for the past ten plus years, almost regardless of the language you develop in. ^
- I have said before elsewhere that Rails is both a blessing and a curse for Ruby. It’s a massive blessing because Ruby owes so much of its popularity to Rails. It’s a curse because such a focus on web development within its community has led to limited applicability outside of the realm of web development. Python was spared by such a fate. ^
- It’s remarkable how popular Clojure has managed to become despite its Lisp syntax. A testament to how many other things they got right. ^
- There is a fine line between being enthusiastic users and brigading other communities. Always be respectful of other communities and don’t arbitrarily spam your language around. ^
The post So You Want Your Programming Language to Be Popular appeared first on Programming Zen.