GitHub is probably the most popular software repository in the world. One important feature on GitHub is the ‘pull request’: we often contribute to a piece of software by proposing changes to a piece of code.
The number of pull requests is not, per se, an objective measure of how much one contributes to a piece of software. Pull requests can be large or small. It is also possible to commit directly to a software project without ever creating a pull request. Furthermore, some automated tools will generate pull requests (for security patches). This is especially common in JavaScript and TypeScript.
Nevertheless, in my view, the number of pull requests is an important indicator of how much people are willing and capable of contributing to your software in the open source domain.
The gist of the story goes as follows:
- The most popular languages are JavaScript/TypeScript and Python with roughly 20% of all pull requests each. In effect, if you put JavaScript/TypeScript and Python together, you get about 40% of all pull requests.
- Then you get the second tier languages: Java and Scala, C/C++, and Go. They all are in the 10% to 15% range.
- Finally, you have PHP, Ruby and C# that all manage to get about 5% of all pull requests.
- Other languages are typically far below 5%.
The popularity of JavaScript and derivative languages is strong. It matches my experience. I have published a few JavaScript/TypeScript librairies (FastPriorityQueue.js and FastBitSet.js) and they have received a continuous flow of contributions. It appears that TypeScript is progressively replacing part of JavaScript, but they are often used interchangeably.
Python is close behind: 15% to 20% of the pull requests. I suspect that being the default programming language of data science is helping sustain its well deserved popularity. I mostly use Python for quick scripts.
Java and Scala are still quite strong (10% to 15%): we do not observe a decline in the popularity of Java and it may even be gaining. It seems that the bet on faster release cycles in Java is beneficial. The language and the JVM are fast improving. Our RoaringBitmap library is receiving a constant flow of high-quality pull requests. I am a little bit surprised at the sustained popularity of Java, but it is undeniable. I find that building and publishing Java artefacts is unnecessarily challenging, compared to JavaScript and Python.
C/C++ is on the rise (above 10%). C++ has roughly doubled its relative popularity in terms of pull requests in the last ten years. I suspect that the great work that the C++ standard committee is doing, modernizing the language with every new standard, is helping. The tooling in C++ is also fast improving: it is easier than ever to write good C++ code. I have probably never spent as much time programming in C++ (simdjson, simdutf, ada, fast_float). I find it easy to find really smart collaborators.
Go is holding at nearly 10%: it underwent a fast rise but seems to have plateaued starting in 2018. I imagine that the imminent release of Go 2.0 could help. Our Bloom and bitset libraries in Go (see roaring too) receive many pull requests. Go is still one of my favourite programming languages. You can teach Go in a week-end, it comes with all the necessary tools (benchmarking, formatting, testing), its runtime library is accessible and complete, it is trivial to deploy a Go binary on a server, it builds quickly.
PHP and Ruby are falling (both at 5%) to C# level (around 5%). Ten years ago, both PHP and Ruby were default programming languages on the web. I am not exactly sure why PHP is falling in popularity among open source developers, but I suspect that it might be suffering at the hands of JavaScript/TypeScript. C# is holding steady but I consider that it is an underrated programming language.
The “pull_requests” looks tendencious, it might be higher for JavaScript because of dependabots for node packages. You can see that there’s a huge discrepancy with other metrics such as issues, pushes, and issues.
My blog post mentions this bias but it seems that irrespective of the metric, JavaScript/TypeScript and Python are most popular.
Being on the software development side of things for the last 28 years I can say with certainty python is most popular by use.
Android development is keeping Java relevant otherwise it would be in the single digit percentile.
Lol java is used for much more than android. Huge for backend systems. There’s an inherit bias by looking at just public GitHub statistics to measure real usage amongst businesses.
I think that there is much evidence that Java is used for a lot of challenging backend work. Here are some trending Java repositories right now:
Java is what made Android exist obviously.
Got that right! This is a very mature and powerful language with huge programing fan base.
Not sure what the author is trying to prove… that github pulls come mainly from JS devs… whoopdidoo..
This has no relevance whatsoever to the real commercial world.
I believe that in the real commercial world, JavaScript is important.
For Java Android is irrelevant… Android is focused on Kotlin anyway. But, Java is huge in the serious enterprise world, so this data of looking into public repos only is showing a lot less usage then there actually is… And with recent faster development cycle it might grow as the language is finnaly getting slicker.
It seems to me that society really needs only two languages: C and python. With python you can make something quickly and with C you can make something that is fast.
C was created in 1972 and Python in 1995. If those were really enough, why have dozens of languages been created since then? Rust, Go, Scala, Kotlin, Swift, Clojure, Nim, Elixir, Julia, Idris, SPARK and Elm, for just a few examples. Most of those languages are safer than C, and many avoid the runtime errors than a Python program can have. They’re pretty much all faster than Python, and several could be faster than C in the right circumstances. Often being 5 times slower than C and much easier to program in is fast enough, and much faster than Python.
I’ll argue you don’t need more then 1 language, what you do need is a good compiler, pick a language that’s easy to use, and make a good enough compiler for it and it can do anything, if you want it to be fast to develop on give it a interpreter as well, we have multiple languages because of 1 real reason, we build languages around something else we are building, be it a os, processor, compiler or application
Several could be faster than C? Yeah right. C is the only programming language worth its venom.
“fast”, “quickly”, … You forgot about “complex”. Both C and Python arguably make writing complex programs difficult. C’s unsafe nature and general lack of language features make it difficult to manage complexity. Python’s dynamic typing in particular makes it more difficult when applications get complex.
There are differing schools of thought, but in general for complex applications, static typing, automatic memory management, polymorphism, etc (OOP features, functional constructs, depending on who you ask) are things that can help manage complexity.
Plus, there are countless philosophies on how to best write code and structure programs; thus the countless programming languages out there.
Just some items for thought whenever this topic comes up (& I’ve been in the industry for 20+years).
1 this is an open source metric, & you can’t forget that. There’s a huge amount of proprietary development in software.. business & games alone are trillions of lines of code all invisible to your metrics, and so much in C\C++, C#, and once upon a time even Visual Basic! Even horrible Java, the Catan of the programming world, has a large proprietary business footprint.
Also, so many people learning programming these days, esp bootcamps, encourage their ppl to create repositories to create fake histories as experience; and a large number of them are in web development.
It’s like going to a school and saying, everyone uses pencils, they’re clearly the most popular. Probably in part though to the fact you’ll probably never see a Montblanc there… 😎
I agree, but it does not follow that the number of GitHub pull requests is not a good indicator. I do think that a lot of people use JavaScript/TypeScript, and not just students.
That is not logical. You can’t dismiss the scope and importance of proprietary software.
I did not dismiss the scope and importance of proprietary software. However, GitHub is enormous and the reach of open source software is large (including within private enterprises). If a language is important on GitHub, it is likely important in the software industry.
This method is probably not accurate. C# has a much larger percentage since so much of the existing code is managed in other source code managers such as perforce, etc.
The title of the blog post is “Programming-language popularity by GitHub pull requests”.
Probably the best reply I have seen in the last year 🙂
Where rust ?
Rust represents fewer than 2% of the pull requests.
I mean, when you don’t have to update your codebase every month due to a new version and the code is pretty stable in general and security issues even with large lock files are rare, you don’t need a lot of pull requests.
Rust community prefers small, stable compilation units afaics and has naturally less security issues, so it’s just normal to be an underdog in this metric. Pull requests aren’t necessarily contributions in the sense of getting more, many are just having to do maintanence.
And whether having to do lots of maintenance and having contributers and bots for those chores is a good thing.. well..
I think java is better
VB.net is the most underrated language, it’s much more intelligible than c# and can do most of the things c# can do. Because it’s compiled code, it’s so much faster than python.
You’re literally the only person that thinks this.
Well, then he’s definitely right, isn’t he?
Having worked on a VB.NET/C# codebase for 3 years, I would vehemently disagree (as would most people, it seems). However, one of my old coworkers would take your side, and you’d both be wrong 😉
Javascript really is a terrible language with “features” that lend themselves to rampant abuse, the most egregious probably being inline functions. It has constructs that make no sense in an interpreted environment, like “new()”. And the mountains of “legacy” nested callback code in asynchronous scopes can, depending on budget, quite literally paralyze a project both in development and runtime execution. My question is what forces contribut to its being most popular? Is it simply because it is supported by web browsers? If so, why has something different never replaced it?
I’m glad you asked. You’re right; as a language, it has no merit to rise on. It’s popularity was and is entirely by accident of its inclusion in early web browsers which gained it a foothold. I’ve spent the last 20 years aghast that it seems to disturb so few folk that the language of the most ubiquitous platform on the planet, the browser, doesn’t even support integer numbers. It’s madness. Fortunately WebAssembly has a chance of dethroning it. The ignorant will then claim WebAssembly rose on the shoulders of JavaScripts good work..ofUgh… Maybe in the benefit of hindsight in the far future they’ll look back and truly recongnise JS as the ‘stain’ that held us back. It’s gone on far too long.
Dream on. As if webassembly could harm JavaScripts monopoly. Maybe for a few projects, but at large, especially for businesses, it makes no sense to get coders for the expensive languages when you can get regular web devs a dime a dozen on the street corner.
Thanks for doing this analysis, cool
To confirm: it covers only the public repos on GitHub?
GitHub is also a popular option for private repos. I have no idea of its “market share” in that huge space.
I suspect that it does not include private repo.
I just really wonder when c# will replace with javascript. Maybe they say razor blazor etc.. but there are some learning difficulties. Why they make them more complicated. Javascript at least simple work on browser.. anyway thank you for nice article 🙏
Bah, Humbug! Everything should still be in assembly.
I only use 0’s and 1’s. Native is the best.
I would like to see stats by “developer” …not check-ins. …maybe even “fractional developers”. For example, I’m a 99% C# developer, 1% Other