Programming-language popularity by GitHub pull requests

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:

  1. 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.
  2. Then you get the second tier languages: Java and Scala, C/C++, and Go. They all are in the 10% to 15% range.
  3. Finally, you have PHP, Ruby and C# that all manage to get about 5% of all pull requests.
  4. 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.

Source: A small place to discover languages in GitHub.

Daniel Lemire, "Programming-language popularity by GitHub pull requests," in Daniel Lemire's blog, April 7, 2023.

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

39 thoughts on “Programming-language popularity by GitHub pull requests”

  1. 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.

      1. 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.

        1. 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.

          1. 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:

            • Apache Dubbo
            • Apache SkyWalking
            • QuestDB
        2. 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.

        3. 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.

  2. 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.

    1. 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.

      1. 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

      2. Several could be faster than C? Yeah right. C is the only programming language worth its venom.

    2. “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.

  3. 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… 😎

    1. 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.

        1. 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.

  4. 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.

      1. 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..

  5. 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.

    1. 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 😉

  6. 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?

    1. 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.

      1. 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.

  7. 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.

  8. 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 🙏

Leave a Reply

Your email address will not be published.

You may subscribe to this blog by email.