Is Python Actually More Popular than JavaScript in 2024?
Date: 2024-11-13 | create | tech | python | javascript |
GitHub recently released their yearly stats roundup for 2024, claiming that Python has overtaken JavaScript as the most popular language for the first time in 10 years. This has naturally led to a lot of discussion as JavaScript is the language of the web and it seems odd it could be dethroned at all.
So here we're going to take a closer look at that claim and see if Python is actually more popular than JavaScript.
GitHub claims Python is more popular than JavaScript
First let's take a look at GitHub's claims.
In terms of overall programming language based on distinct users contributing in that language, GitHub ranks:
- Python
- JavaScript
- TypeScript
- Java
- C#
For most popular languages for new repositories:
- JavaScript
- Python
- Java
- TypeScript
- C#
The takeaways here are:
- The top language is likely JavaScript or Python
- The metrics they're ranking by are not the most straightforward
How GitHub ranks language popularity
Now that we know what rankings GitHub presented, let's take a look at the fine print around how they produced their overall rankings.
GitHub says: "We look at the totality of activity across commits, issues, pull requests, comments on issues and pull requests, discussions, pushed code, and reviewed pull requests, among other things."
So from this it seems like any action a user takes in a repo will be counted but because it is aggregated by "distinct user", no action after the first counts. So here it seems that this metric prioritizes "breadth" of contributions not depth. If you make 1000 contributions in a single project - that just counts as one - so someone else who made 2 contributions in 2 projects will count as more than you.
Another thing to note is that we don't see a definition on what a project in a language means. Is it the majority language? What %?
For many projects this may not matter too much as the majority language likely is the correct language to attribute but for some projects that use monorepos across frontend / backend this may not be an accurate count.
Is Python Actually More Popular than JavaScript?
GitHub certainly seems to think so but it depends how you calculate these things.
If you look at code pushes without the other GitHub actions like PRs, comments, and issues - JS comes out on top.
From GitHub: "Notably, JavaScript still ranks first for code pushes alone. More developers still use JavaScript more often to push code, but in absolute activity across all contribution types on GitHub, Python now outranks JavaScript."
This seems to go back to the metric they are using with distinct user contributions - where they prioritize "breadth" of contributions over "depth".
If you combine JS + TS - JS comes out on top.
From GitHub: "While Python is increasing in contributor counts for both code push activity alone and other activity faster than JavaScript, it isn’t increasing in those faster than JavaScript and TypeScript combined. Rather than a slow down in the JavaScript community, what we are seeing is a transition to TypeScript for a large proportion of new commits."
JS + TS are different languages but they are largely the same ecosystem. So on one hand yes it makes sense to track them separately but on the other they're kind of the same thing.
Stack Overflow's Dev Survey puts JS over Python
Stack Overflow's 2024 dev survey has JavaScript beating out Python by a cool 10% of respondents. This survey obviously has its own problems but goes to show that depending on how you calculate these rankings, JS can easily come out on top.
Next
Big picture it doesn't really matter if Python or JavaScript is the most popular language on GitHub - they're both hugely popular with very mature ecosystems. At the end of the day you should pick the best tool for the job (and that you ideally like using) and go from there.
If you liked this post you might also like:
Want more like this?
The best / easiest way to support my work is by subscribing for future updates and sharing with your network.