This iteration of the RedMonk Programming Language Rankings is brought to you by MongoDB. Join our community today and build your next application on any cloud with MongoDB Atlas. More than 30 programming languages are supported!
Given that we’re days out from the second quarter, it’s about time for us to post our first quarter language rankings. We’ve been very busy over the past few months, but have found the time to run the requisite queries, the plot scripts and consider the results. We’ll get into those below.
In the meantime, as a reminder, this work is a continuation of the work originally performed by Drew Conway and John Myles White late in 2010. While the specific means of collection has changed, the basic process remains the same: we extract language rankings from GitHub and Stack Overflow, and combine them for a ranking that attempts to reflect both code (GitHub) and discussion (Stack Overflow) traction. The idea is not to offer a statistically valid representation of current usage, but rather to correlate language discussion and usage in an effort to extract insights into potential future adoption trends.
Our Current Process
The data source used for the GitHub portion of the analysis is the GitHub Archive. We query languages by pull request in a manner similar to the one GitHub used to assemble the State of the Octoverse. Our query is designed to be as comparable as possible to the previous process.
- Language is based on the base repository language. While this continues to have the caveats outlined below, it does have the benefit of cohesion with our previous methodology.
- We exclude forked repos.
- We use the aggregated history to determine ranking (though based on the table structure changes this can no longer be accomplished via a single query.)
- For Stack Overflow, we simply collect the required metrics using their useful data explorer tool.
With that description out of the way, please keep in mind the other usual caveats.
- To be included in this analysis, a language must be observable within both GitHub and Stack Overflow.
- No claims are made here that these rankings are representative of general usage more broadly. They are nothing more or less than an examination of the correlation between two populations we believe to be predictive of future use, hence their value.
- There are many potential communities that could be surveyed for this analysis. GitHub and Stack Overflow are used here first because of their size and second because of their public exposure of the data necessary for the analysis. We encourage, however, interested parties to perform their own analyses using other sources.
- All numerical rankings should be taken with a grain of salt. We rank by numbers here strictly for the sake of interest. In general, the numerical ranking is substantially less relevant than the language’s tier or grouping. In many cases, one spot on the list is not distinguishable from the next. The separation between language tiers on the plot, however, is generally representative of substantial differences in relative popularity.
- In addition, the further down the rankings one goes, the less data available to rank languages by. Beyond the top tiers of languages, depending on the snapshot, the amount of data to assess is minute, and the actual placement of languages becomes less reliable the further down the list one proceeds.
- Languages that have communities based outside of Stack Overflow such as Mathematica will be under-represented on that axis. It is not possible to scale a process that measures one hundred different community sites, both because many do not have public metrics available and because measuring different community sites against one another is not statistically valid.
With that, here is the first quarter plot for 2022.
1 JavaScript
2 Python
3 Java
4 PHP
5 CSS
5 C#
7 C++
8 TypeScript
9 Ruby
10 C
11 Swift
12 R
13 Objective-C
14 Shell
14 Scala
16 Go
17 PowerShell
18 Kotlin
19 Rust
19 Dart
The story of this quarter’s run – as it has been for a few runs now – is stability. Outside of a few notable exceptions that we’ll discuss momentarily, the rule of language movement in recent years has been that there is little movement. Seventeen of the twenty languages here, in fact, have been stable for three consecutive quarters. This poses an interesting question: is this stability representative of industry usage, or is it a more akin to a process artifact?
We have always cautioned against usage of these rankings as a one to one representation of actual language usage in the industry as a whole. But at the same time, we’ve always believed that surveying two very large populations of developer activity is a useful exercise, and one that has the potential to be predictive – which, in fact, it has been on many occasions.
As movement within these rankings begins to lessen, however, it is interesting to consider whether we may be moving into an era of relative stasis. New languages will continue to emerge, of course, and some may rise due to the addition of new features or due to external factors (e.g. Dart below), but as we look around the industry it may be that a certain equilibrium is in the process of forming. A state where languages have found their respective niches and a level with their particular competition.
It’s too early to say, and it’s possible that all of this is neither artifact nor industry shift but the result of other external factors, with the ongoing pandemic and its widespread impacts both seen and unseen being the obvious candidate. In any event, it’s something that we’ll be watching closely.
- Python (0) / Java (-1): After its brief one quarter return to a second place tie with Python, Java slipped back this run to third place. To be clear, a third place finish on this leaderboard is still an enormously impressive achievement, as it places the language once designed for cable boxes above some truly elite alternatives. But Python’s continued and sustained strength is something to behold as it’s now spent two consecutive years in the second spot on our ranking, and has once more put some daylight between it and the most popular language for enterprise development and for one of the two largest mobile ecosystems in the world. Quite an accomplishment for a language that some have derisively referred to as “just a glue language.”
- PHP (0): PHP didn’t move at all in this run, which is not unusual and not just because things have been stable in recent years. PHP has held fourth place, in fact, since the first run of 2017, when it was passed by Python during the latter’s ascent. The reason to note this is because PHP is still, after all these years, looked down on. Python has shade directed in its direction from time to time, but PHP might as well be living in the dark for all of the respect it is given. And all it does is power a majority of the world’s websites. PHP, whatever people may think of it, remains a force.
- C++ (-2): During our last run, C++ was fifth, tied with C# and CSS. This time around, it was one of the rare languages to move, and it dropped not just one spot but two, to seventh. While this drop could be purely temporary, one wonders if it might be following in its ancestor’s footsteps. The original C was eighth when we started doing these rankings, slipped to ninth and is now tenth. The last time C++ ranked as low as seven, meanwhile, was the second run of 2013. It will be interesting to see if this is just a blip, or whether this dip represents the new baseline for the language moving forward and whether further declines are to come.
- TypeScript (0): Speaking of further declines, right behind C++ on our rankings this run is TypeScript. The fastest growing language since Swift and the only one of the two to crack the Top 10, TypeScript seemingly settled into something of a plateau at eight, having spent the last three quarters in sole possession of that spot. The question is whether the language has more upside left, or if this is more or less the language’s ceiling. It won’t be easy to move up – even if C++ dropped this time, there is an enormous body of that code and related discussion already present, but then again if TypeScript is to continue its journey up the board languages like C++ are exactly what it will need to pass.
- Dart (+1) / Rust (0) / Kotlin (0): On the one hand, it is not exactly shocking that Kotlin (#18) and Rust (#19) didn’t move in these rankings – as discussed at length above, this was very much the norm. It’s mildly surprising, perhaps, because both languages have been “hot” recently and generated quite a bit of interest and attention, each for differing reasons. But it takes a lot to move within the Top 20. What was very surprising, however, was the fact that Dart was able to move up one spot and tie Rust at #19. It took Kotlin two quarters to make that jump, and while Rust did it similarly in a single quarter, Rust also had a great deal more time. Some thirty-six months after Dart was languishing about in the mid-30’s, it has not only cracked the Top 20, it has tied the developer darling Rust in doing so. The two most important questions now are first whether it can sustain this place and, if so, whether there is more upside to be had. The next run or two should tell us a great deal about these three languages.
Credit: My colleague Rachel Stephens wrote the queries that are responsible for the GitHub axis in these rankings. She is also responsible for the query design for the Stack Overflow data.