Author: Karsten Silz
Sep 7, 2022 8 min read

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

Java Full-Stack Index Q3/2022: JVM Languages

The content of this page is identical throughout Q3/2022 - July, August, and September.

Summary for Q3/2022

  • Popularity trend: Java is #1, Kotlin #2, and Scala #3. Java leads Kotlin by an order of magnitude in job ad mentions, Udemy students, and Google searches. In questions at Stack Overflow, Java leads 5:1. Scala surpassed Kotlin in job ad mentions.
  • 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 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 92% 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.

Job ad mentions at Indeed for Java and Kotlin
Job ad mentions at Indeed for Java and Kotlin

And here are the remaining languages:

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

Java wins by an order of magnitude, Scala may be second, and Kotlin is third. In Japan, Scala exploded from 4k to 33k in June! The numbers seem legit, but I’ll keep an eye on this. But even without this “Japan boost”, Scala has 129% of Kotlin’s mentions, making it number two for the first time! Groovy has a fifth of Kotlin’s number while Clojure is last. Kotlin is down to levels measured last November but slowly recovering. Groovy and Clojure are both down month-over-month.

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

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

Developers

Courses Bought at Udemy

Udemy is one of the biggest online learning sites. They publish the number of courses and students beyond a certain threshold (possibly around 100,000 students). 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 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:

Many languages compete with Java. Here are their purchases:

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 36 million students - more than three times as many as Java! That’s more than there are developers in the world, estimated at 27 million this year. If anything, I found it surprising that JavaScript has only 15% more students than Java. The old rival C# sits at 40% of Java. 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, Scala
Google Trends for Clojure, Groovy, Java, Kotlin, Scala

This link produces the chart above.

Even at 1/8 of its peak interest in 2004, Java still beats Kotlin 13: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 third, and Clojure last. We can see the fall of Scala and the rise of Kotlin, both starting five years ago. Kotlin peaked in July 2020 and is now back to its level from two years ago. Scala has been flat for the last year and a half. Groovy has declined for nearly three years, while Clojure has for four years.

Here are searches for the languages that compete with Java:

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

This link produces the chart above.

Here are Java’s 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 50% more popular than either Java or JavaScript, which are neck-to-neck. It’s the only language that has grown in searches in the last three years. C# has half of Java/JavaScript’s search numbers, while Go 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, Scala third. After a five-year rise, Kotlin seems to plateau at a fifth of Java’s question volume. Java has lost half its questions in the last seven years, while Scala lost nearly two-thirds over the previous five years. Groovy and Clojure have hovered just above zero for as long as Stack Overflow has existed.

Here are the questions for the languages that compete with Java:

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

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! JavaScript has declined for two years but still has 70% of Python’s numbers. After falling for 8 years, Java has half the questions JavaScript has. After dropping for 12 years, C# has stabilized in the last year and is gunning for Java. After a seven-year rise, TypeScript has declined a bit and sits at half of C#’s questions. Go peaked half a year ago and is slightly falling, having a tenth 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 still neck-to-neck with Kotlin and even comfortably ahead of it in places like North America (where it leads Kotlin 2:1). But Kotlin leads globally in job ads. And Google searches and Stack Overflow questions also 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 take.

comments powered by Disqus