Python just brushed past JavaScript to become the most popular programming language on GitHub – and a key factor is that AI developers love it
The meteoric rise of Python shows no sign of stopping
Python has overtaken JavaScript to become the most popular programming language on GitHub, according to new figures released by the firm, largely thanks to the rise of machine learning and generative AI.
The coding platform revealed that there are now 518 million projects on GitHub, up by a quarter year-on-year, with 5.2 billion contributions to projects over the course of 2024.
AI is having a major impact, the firm noted. There's now 137,000 public generative AI projects, almost doubling since last year, and more than a million open source maintainers, students, and teachers have used the free AI-powered GitHub Copilot tool.
With Python taking the top spot on GitHub, its ascendancy brings to an end ten years of JavaScript holding the top spot. Moving down to second, the programming language is followed by TypeScript and Java.
It’s not all bad news for the language, however. JavaScript is still the top ranked for code pushes — which means more developers use it more often to push code — but across all activities on the site, including commits, issues, pull requests and more, Python is now the top language.
"More developers still use JavaScript more often to push code, but in absolute activity across all contribution types on GitHub, Python now outranks JavaScript," GitHub said in a blog post.
Python's meteoric rise to prominence
GitHub identified two key factors behind Python's popularity on the platform - namely the rise of data science and generative AI, as well as TypeScript cutting into JavaScript's lead.
Get the ITPro. daily newsletter
Receive our latest news, industry updates, featured resources and more. Sign up today to receive our FREE report on AI cyber crime & security - newly updated for 2024.
The firm said TypeScript had grown exponentially from 2014 to 2019, overtaking Java last year to join the top three programming languages.
"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," the post noted.
"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."
It's not just Python that’s benefitted from the rise of machine learning either. Jupyter Notebooks has seen a spike in usage of 92% over the last year and 170% since 2022.
"This could indicate people in data science, AI, machine learning, and academia increasingly use GitHub," the post added.
GitHub's ranking echoes recent research by cloud data company Snowflake, which in March revealed Python had become the go-to programming language for developers building generative AI applications, pointing to 571% growth on its own platforms.
But Stack Overflow's 2023 survey ranked Python third overall, which it said was a reflection of who uses the language. It’s the fourth most popular programming language among professional developers, but more popular among those learning to code and the top ranked for those who aren't full time developers but use some coding at work.
That tracks with GitHub's assessment that the rise of AI and data science was drawing a wider range of people into coding.
"Python is used heavily across machine learning, data science, scientific computing, hobbyist, and home automation fields among others," GitHub added.
"The rise in Python usage correlates with large communities of people joining the open source community from across the STEM world rather than the traditional community of software developers.
"The notion of who a developer is and the scope of what a developer does is changing. The rise in Python, HCL, and Jupyter Notebooks, among other things, indicates that the notion of a developer extends beyond software developers to roles like operations or IT developers, machine learning researchers, and data scientists."
Other shifts driven by AI
AI is helping to encourage coding globally by making it easier for people from a wider range of countries, GitHub said.
"The rise of these non-English, high-population regions is notable given that it is happening at the same time as the proliferation of generative AI tools, which are increasingly enabling developers to engage with code in their natural language," the post said.
And that's good news for the industry. By attracting a more diverse community of developers, this will ultimately drive innovation long-term, the firm noted.
"Increased access to and experimentation with AI could also simplify and personalize the coding journey for new developers, lowering entry barriers and further diversifying GitHub’s community of developers."
More widely, generative AI is becoming a core part of software development at every stage.
"They power coding tools that offer fixes and context behind vulnerability remediations, suggestions in response to natural language prompts and existing code, and facilitate learning among new and experienced developers alike," the post added.
"They’re also changing how developers build applications, and developers will benefit from platforms that allow them to easily experiment with AI models as building blocks without requiring separate setups or extra costs."
Previous research from GitHub found that developers are beginning to unlock real value from AI coding tools, with respondents to a recent survey relieving the solutions have helped them learn new languages and save time.
GitHub just launched a new free tier for its Copilot coding assistant – but only for a select group of developers
Virtual reality could be the next frontier in software development: Devs are excited about productivity and virtualization benefits — but hefty price tags and health concerns may hamper adoption