Author: Karsten Silz
Dec 7, 2022   |  updated Dec 7, 2022 8 min read

Permalink: https://betterprojectsfaster.com/guide/java-full-stack-report-2022-12/lang/

Java Full-Stack Index Q4/2022: JVM Languages


This is an old version! Click below for the current one.

See Current Version


The content of this page is identical throughout Q4/2022 - October, November, and December.

Summary for Q4/2022

  • Popularity trend: Java is #1, Kotlin #2, and Scala #3. Java lost 20% of its job ad mentions over the last five months but still leads Scala and Kotlin and its non-JVM competitors like Python or JavaScript. Scala’s recent lead in job ad mentions over Kotlin shrinks. Kotlin leads Scala in all other categories. Groovy and Clojure have mostly declined for many years.
  • On your current project, keep your existing language unless that language is absolutely, really not working out for you.
  • If you need to switch languages or are on a new project:
    • Use Scala if you need functional programming.
    • Use Kotlin if you really need a “more modern Java”.
    • Otherwise, use the latest Java LTS version you, your team, and your application can take.

Archive

2022 Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan
2021 Dec Nov

Table Of Contents

Choices

Here are the choices in alphabetical order:

Popularity

Why Popularity - and How?

Picking a popular technology makes our developer life easier: Easier to learn, easier to build, debug & deploy, easier to find jobs/hire, and easier to convince teammates & bosses. Now popularity can make a difference in two situations: When multiple technologies score similarly, we could go for the most popular one. And when a technology is very unpopular, we may not use it.

I measure popularity among employers and developers as the trend between competing technologies. I count mentions in job ads at Indeed for employer popularity. For developer popularity, I use Google searches, Udemy course buyers, and Stack Overflow questions.

Employers: Job Ads

The Indeed job search is active in 62 countries representing 89% of the worldwide GDP in 2020. It demonstrates the willingness of organizations to pay for technology - the strongest indicator of popularity in my mind. Kotlin is the baseline. Please note that the chart is not proportional, so all languages fit nicely.

Job ad mentions at Indeed for Clojure, Groovy, Java, Kotlin, and Scala
Job ad mentions at Indeed for Clojure, Groovy, Java, Kotlin, and Scala

Java wins, Scala is a distant second, and Kotlin is third. Java lost a fifth of its mentions in absolute terms, declining from 493k at the end of May to 397k at the end of September. Still, it leads Kotlin 8.6:1. Scala remains number two, but again, more than half of its mention (30.4k) is in Japan. But so are nearly half of Kotlin’s numbers (22k)! Groovy has a sixth of Kotlin’s numbers, while Clojure is last. Kotlin is down to levels measured last November but slowly recovering. Groovy and Clojure are both down month-over-month.

Now let’s look at how Java does against the JVM competition.

Job ad mentions at Indeed for C++, C#, Go, Java, JavaScript, TypeScript, Python, and Rust
Job ad mentions at Indeed for C++, C#, Go, Java, JavaScript, TypeScript, Python, and Rust

Java wins, Python and JavaScript place second, and C# is fourth. Java leads its two closest competitors, Python and JavaScript, by 10%. C# and C++ have half of Java’s numbers, while TypeScript has a quarter. Go and Rust pale in comparison.

Please see here for details, caveats, and adjustments to the job ad mentions.

You can find the detailed search results with links here. They include breakdowns by continents:

Developers

Students at Udemy

Udemy is one of the biggest online learning sites. They publish the number of people who bought a course (beyond a certain threshold, possibly around 100k). This shows how many people evaluate a technology. Kotlin is the baseline.

Students at Udemy for Java, Kotlin, Scala
Students at Udemy for Java, Kotlin, Scala

Java wins by an order of magnitude, Kotlin is second, and Scala is third. Scala is stable against Kotlin, while Kotlin slowly gains on Java. Groovy and Clojure don’t have enough students to cross the display threshold.

Here are the links that show the courses for all and the number of students for some:

Here are the number of students for languages that compete with the JVM:

Students at Udemy for C#, Go, Java, JavaScript, and Python
Students at Udemy for C#, Go, Java, JavaScript, and Python

Python wins, JavaScript is second, Java third, C# fourth, and Go a distant number five. It’s hard to fathom how popular Python is: It has nearly 37 million students — almost three times as many as Java! That’s more than there are professional developers worldwide, estimated at 27 million this year. JavaScript leads Java by 10%. Java’s old rival C# sits at 41% of Jav and may slowly catch up to it. Go, the new kid on the block, has just 6% of Java’s numbers.

Here are the links that show the courses and number of students for all:

Google Searches

Google Trends demonstrates the initial interest in a technology over time:

Google Trends for Clojure, Groovy, Java, Kotlin, and Scala
Google Trends for Clojure, Groovy, Java, Kotlin, and Scala

This link produces the chart above.

Even at 1/8 of its peak interest in 2004, Java still beats Kotlin 16:1. Its decline may have stopped.

To get a better picture of the Java alternatives, here they are without Java:

Google Trends for Clojure, Groovy, Kotlin, Scala
Google Trends for Clojure, Groovy, Kotlin, Scala

This link produces the chart above.

Among the Java challengers, Kotlin wins, Scala is second, Groovy is third, and Clojure is last. We can see the fall of Scala and the rise of Kotlin, both starting five years ago. Please note that Google changed how it counts in 2022, which explains the boost for Kotlin and Scala in early 2022. Kotlin peaked last April and has declined since then. Scala has also shrunk for the last half year. Groovy has declined for nearly three years, while Clojure has for four years.

Here are searches for the languages that compete with the JVM:

Google Trends for C#, Go, Java, JavaScript, and Python
Google Trends for C#, Go, Java, JavaScript, and Python

This link produces the chart above.

Here are the JVM competitors over the last three years:

Google Trends for Clojure, Groovy, Kotlin, Scala
Google Trends for Clojure, Groovy, Kotlin, Scala

This link produces the chart above.

Python wins, Java is second, JavaScript third, C# fourth, and Go fifth. Python is 38% more popular than either Java or JavaScript, which are neck-to-neck. Python and JavaScript are the only languages that have grown in searches in the last three years. C# has only 40% of Java/JavaScript’s search numbers, while Go only has 50% of C#’s numbers.

Questions at Stack Overflow

Stack Overflow Trends shows which percentage of questions at Stack Overflow has a particular technology tag. It is a proxy for using a technology during evaluation and productive use. “More questions = better” to me.

Questions at Stack Overflow for Clojure, Groovy, Java, Kotlin, Scala
Questions at Stack Overflow for Clojure, Groovy, Java, Kotlin, Scala

This link produces the chart above.

Java wins, Kotlin is second, and Scala is third. Java has lost 55% of its questions in the last seven years. Kotlin grows again and has a quarter of Java’s questions. Scala lost two-thirds of its question volume over the previous five years. Groovy and Clojure have hovered just above zero for as long as Stack Overflow has existed.

Here are the shares of questions for the languages that compete with the JVM:

Questions at Stack Overflow for C#, Go, Java, JavaScript, Python, and TypeScript
Questions at Stack Overflow for C#, Go, Java, JavaScript, Python, and TypeScript

This link produces the chart above.

Python wins, JavaScript is second, Java third, C# fourth, TypeScript fifth, and Go sixth. Python’s incredible popularity shows again: After a ten-year rise, it captures one in six questions on Stack Overflow! But it peaked earlier this year and may have flatlined, sitting at a value it first reached two years ago. JavaScript has declined for two years but still has 71% of Python’s numbers. After falling for eight years, Java only has 43% of the questions JavaScript has. And after dropping for 12 years, C# has risen again in 2022 and is gunning for Java. After a seven-year rise, TypeScript just hit its all-time high and sits at half of C#’s questions. Go just peaked as well at a seventh of Java’s numbers.

Analysis

  • Usage of Java still dominates its alternatives, often by an order of magnitude.
  • The evolution speed of the Java languages has increased. So even staying with the incumbent Java makes life for us developers easier.
  • If Oracle gets its will, then we’ll get a new Java LTS every two years instead of every three years. This would speed up the delivery of Java language improvements.
  • Kotlin is the best Java alternative. I believe that Kotlin’s rise in popularity is partly fueled by its status as the default language for Android development.
  • Scala lost its position as the #2 JVM language. In job ads, it’s now ahead of Kotlin, especially in places like North America (where it leads Kotlin 2:1). But Google searches and Stack Overflow questions trend towards Kotlin. That’s why Scala is #3 for me.
  • There’s one overwriting factor that requires Scala: functional programming. If that’s your need, you have to use Scala on the JVM.
  • Groovy is a has-been on the JVM: Kotlin stole its place of “better Java”, while Grails (Ruby-on-Rails with Groovy on the JVM) has fallen out of favor. I know that the Tiobe Index places Groovy way ahead of other JVM language alternatives to Java, but I think that view is somewhat exclusive to Tiobe.
  • Clojure fills the niche of “Lisp on the JVM”.

Here’s my recommendation:

  • On your current project, keep your existing language unless that language is absolutely, really not working out for you.
  • If you need to switch languages or are on a new project:
    • Use Scala if you need functional programming.
    • Use Kotlin if you really need a “more modern Java”.
    • Otherwise, use the latest Java LTS version you, your team, and your application can stomach.

comments powered by Disqus