Which Programming Languages Will Be Popular in 2031?
Five-year forecasts for technology are notoriously unreliable. But popularity trends in programming languages move slowly — the forces that drive them (hiring, infrastructure inertia, ecosystem investment) are sticky. Here is what the current LangPop data, job market signals, and structural shifts in AI tooling suggest about 2031.
Methodology note: This forecast draws on current LangPop composite scores (week of May 10, 2026), multi-year GitHub trend data, Stack Overflow developer surveys (2020–2026), job posting growth rates, and the emerging influence of LLM coding tools on language adoption. Forecasts are structured as directional ranges — not point predictions — because language popularity is path-dependent and sensitive to a small number of platform decisions (Apple, Microsoft, Google) and breakthrough technologies.
How programming language popularity actually changes
Before the forecasts: what actually moves the needle over five-year horizons?
Platform adoption
Apple mandating Swift, Google mandating Kotlin, AWS choosing Go for Lambda internals — platform decisions create forced adoption at scale. These are the biggest single shocks to language rankings.
LLM training data
Languages with more open-source code get better AI code generation. Better AI generation → lower barrier to adoption → more developers → more code. Python and TypeScript have compounding advantages here.
Hiring inertia
Enterprises maintain existing stacks for 10–20 years. Java, C#, and PHP will keep generating jobs long after developer surveys declare them "declining" — because rewriting working systems is expensive.
Memory safety pressure
NSA, CISA, and White House advisories recommending memory-safe languages (2023–2026) are driving Rust adoption in government, defence, and infrastructure projects. Regulatory tailwinds are slow but durable.
Languages that will almost certainly rise by 2031
High-confidence predictions — multiple independent signals converging
Python
Python's lead is structural, not cyclical. Three independent reinforcing forces point upward:
- → AI/ML is the fastest-growing segment of software hiring and Python is its default language. This is unlikely to change in five years — the toolchain (PyTorch, JAX, scikit-learn, Hugging Face) has too much inertia.
- → LLMs write Python better than almost any other language (more training data, more open-source examples). Better AI coding = lower barrier to Python adoption for non-professional programmers.
- → Education default. Python is the first language in the majority of university CS programmes globally. The cohort learning Python in 2026 enters the job market 2027–2029, sustaining demand.
2031 forecast: Still #1. Composite score above 55, possibly approaching 60, as Trends and Reddit data are restored and AI tooling usage is properly measured.
Rust
Rust is arguably the most underranked language in the current composite. GitHub activity (43.64) puts it on par with C++, but job postings (9.99) keep the composite low. That gap is narrowing:
- → Linux kernel Rust adoption is accelerating. New kernel subsystems are being written in Rust; existing C drivers are being rewritten. By 2031, a meaningful fraction of new kernel code will be Rust.
- → Android has committed to Rust for new native code. Google's scale of hiring means this translates into job postings.
- → Memory safety regulatory pressure (NSA/CISA advisories, EU Cyber Resilience Act) is creating demand in defence and critical infrastructure — sectors that hire in volume and pay well.
- → Nine consecutive years as Stack Overflow's "most loved" language means a large cohort of developers are actively trying to use it professionally. When jobs follow, the composite gap closes fast.
2031 forecast: #5–7 range. Jobs gap closes as Linux/Android/infrastructure hiring increases. The key variable: whether Rust breaks into web backends at scale (unlikely) or stays in systems (likely).
TypeScript
TypeScript's current #4 position understates its trajectory. The week-to-week volatility (it was #1 last week) is a measurement artefact. The underlying trend is clear:
- → TypeScript has crossed the "optional → assumed" threshold at most professional JavaScript shops. Pure JavaScript for new production web applications is now the exception, not the norm.
- → GitHub activity (66.59) is essentially tied with Python (66.66) — the most active language on the platform. This lead will persist as the JS ecosystem continues migrating.
- → AI coding assistants generate typed code by default when TypeScript is the ambient language, reinforcing adoption.
2031 forecast: #2–3 range. Moves above JavaScript in the composite as Stack Overflow tagging catches up to actual TypeScript usage (currently heavily undercounted at SO score 4.46).
Languages that will hold their position
Stable — large installed bases protect them despite weak growth signals
Java is perennially declared dead and perennially generates the second-largest job market in software. The enterprise installed base — banking, insurance, retail, government — requires Java maintenance for decades. Kotlin will take more new Android work, but Java backends will not be rewritten on a 5-year horizon.
2031 forecast: #2–4, slight decline. Job market holds; GitHub and SO slowly cede ground to Kotlin and Python.
Go runs Docker, Kubernetes, Terraform, and most of the cloud-native infrastructure stack. These are foundational tools that will be maintained and extended for the next decade. Go's job postings are understated in our composite (many Go roles are listed as "backend" or "cloud infrastructure" without naming the language).
2031 forecast: #4–6 range. Holds cloud-native niche. Key risk: Rust displacing Go in new infrastructure work (already happening at margin).
C++ dominates game engines (Unreal, game runtime code), automotive software, HFT systems, and graphics. None of these are being rewritten in five years. Rust will take new systems work at the margin; C++ remains the incumbent. The "C++ is dying" narrative has been running since 1995.
2031 forecast: #4–6. Loses some new projects to Rust. Retains game/automotive/HFT base.
C# has two large anchors: the Microsoft enterprise ecosystem and Unity game development. The job market (45.00 score) is stronger than its composite rank suggests. .NET continues to be a capable enterprise platform and Microsoft's cloud investment in Azure sustains it.
2031 forecast: #6–8. Stable. Unity's licensing crisis in 2023 may have started a slow migration, but not fast enough to show in 5 years.
Languages to watch: possible surprise risers
Lower probability but non-trivial upside if specific conditions are met
Kotlin
Current: #11WatchKotlin Multiplatform (KMP) is JetBrains' bet to extend Kotlin beyond Android to iOS, backend, and web. If KMP achieves even 20% of React Native's cross-platform adoption, Kotlin's job market doubles. The condition to watch: whether Apple acquiesces to third-party runtime shipping on iOS. Without that, KMP stays a backend/server story.
Zig
Not yet in LangPop top 20WatchZig is the only systems language being built from scratch specifically to replace C (not C++ — just C). It compiles C and C++ code, which gives it a unique adoption path: teams can migrate incrementally. Bun (the JavaScript runtime) was written in Zig — a high-visibility proof of concept. If Zig enters the top 20 by 2027, it likely enters the top 15 by 2031.
Swift (server)
Current: #10WatchSwift rose from #12 to #10 this week. iOS/macOS development sustains it, but the more interesting signal is Apple's push for server-side Swift — particularly for building backend services for Apple platform apps. If Apple ships more developer tooling that makes server-side Swift the obvious choice for Apple-ecosystem backends, the job market grows materially.
Languages likely to fade in composite rank by 2031
Gradual decline, not collapse — these languages will still be widely used
Ruby's decline has been gradual and sustained — from a top-5 language in 2012 to #12 today. Rails' dominance in startup web development gave way to Node.js, then Python, then Next.js/TypeScript. The language is well-designed and has a loyal community, but new projects are increasingly rare. Expect #15–18 by 2031.
PHP ranks #8 today primarily because of the WordPress installed base — approximately 40% of the web runs on WordPress, which requires PHP maintenance. This is genuine demand, but it is maintenance-mode demand, not growth demand. WordPress will still exist in 2031; it will be less of the new-work ecosystem. New PHP frameworks (Laravel) are vibrant but not growing the language's share of new projects.
These three are stable in their current niches but have low new-adoption signals. Perl is legacy systems; Haskell is academia and a few financial firms; Lua is game scripting. None of these niches are growing. By 2031 they will likely fall further down the index as new languages fill out the top 20.
The AI wildcard: will LLMs change which language wins?
The most uncertain input to any five-year language forecast is the impact of AI code generation. Two scenarios worth considering:
Scenario A: AI reinforces Python
LLMs trained on Python-heavy data generate better Python than any other language. This advantage compounds: better AI generation means lower barrier to entry, more new Python projects, more training data for the next model generation. Python consolidates its lead and the gap to #2 widens. The composite score diverges further.
Scenario B: AI abstraction makes the language less relevant
If AI tools become the primary interface to software (you describe what you want, the AI picks the language and writes it), developer choice of language may become less meaningful. Job market signals would shift toward prompt engineering, system design, and AI orchestration rather than language-specific skills. Language popularity becomes a function of what AI tools default to — not what developers prefer.
The LangPop data currently supports Scenario A. GitHub activity, job postings, and tutorial demand are all rising for Python in 2026, not flattening. But the pace of AI capability improvement makes five-year predictions here genuinely uncertain in a way they are not for, say, Java's enterprise trajectory.
Summary: 2026 vs 2031 forecast
| Language | 2026 rank | 2031 forecast | Direction |
|---|---|---|---|
| Python | #1 | #1 | ▲ RisingExtends lead |
| JavaScript | #2 | #2–3 | → StableHolds via browser monopoly |
| TypeScript | #4 | #2–3 | ▲ RisingSO tagging improves, closes gap |
| Java | #3 | #2–4 | → StableEnterprise inertia |
| C++ | #5 | #4–6 | → StableLoses new work, holds installed base |
| Rust | #9 | #5–7 | ▲ RisingJobs gap closes, regulatory tailwinds |
| Go | #6 | #4–6 | → StableCloud infra anchor |
| C# | #7 | #6–8 | → Stable.NET + Unity base |
| Swift | #10 | #8–11 | → StableServer-side wild card |
| Kotlin | #11 | #8–12 | → StableMultiplatform is the bet |
| Ruby | #12 | #15–18 | ▼ FadingNew project share declining |
| PHP | #8 | #10–14 | ▼ FadingWordPress maintenance mode |
What the data cannot tell you
Language popularity indices — including this one — measure what is happening now and what has been happening. They are lagging indicators of structural change. Rust's rise in the composite will follow Rust's rise in hiring by 12–24 months. The actual inflection already happened; the data is catching up.
The right use of a five-year forecast is not to pick the "winning" language and bet your career on it. It is to identify the tail risks: which languages are genuinely declining (Ruby), which are more stable than sentiment suggests (Java, PHP), and which are underweighted by current measurement (Rust, TypeScript) in ways likely to correct.