Analyzing Scala popularity

2016-03-22

Recently, there's been an influx of low-quality blog posts about alleged Scala unpopularity. Usually these articles involve distorting the facts and manipulating the numbers and can be easily debunked. On the other hand, for an outsider or newbie even this kind of logic may look reasonable and believable. I decided to carry out my own analysis to collect all relevant data in one place.

Questioning the Tiobe index

When it comes to measuring programming language popularity, there are several choices.

Probably the most well known site for this kind of things is Tiobe Index, which basically counts the hits of the <language> programming query in popular search engines. It is dead-simple but not very reliable when it comes to measuring commercial success and real project usage. The first 10 languages appear to correlate with reality very well:

  1. Java
  2. C
  3. C++
  4. C#
  5. Python
  6. PHP
  7. Visual Basic .NET
  8. JavaScript
  9. Perl
  10. Ruby

However, it gets really strange after the first 10. For example, Scala ends up on the 30th place in this rating lagging behind Ada, ABAP, Scratch, COBOL, Fortran, Lisp. I didn't even know what ABAP is, but apparently it's a language used to program SAP systems and on indeed.com it has significantly fewer jobs than Scala:

LanguageJobsTiobe #
Scala5,15130
COBOL2,67422
ABAP1,62223
Fortran94624

What's interesting, other functional languages are doing even worse than Scala here. F# (35), Haskell (38) and Erlang (40) are all behind Scala and Clojure couldn't even make it to the top 50.

RedMonk and PYPL

RedMonk does a similar thing but probably better. Its index is built on GitHub and StackOverflow data and apparently has a bias towards open-source and the languages embraced by enthusiasts.

For example, according to RedMonk, Clojure (#19) is more popular than Delphi/Pascal (not in the top 20). At the same time, according to indeed.com Delphi has more jobs than Clojure: 1,362 versus 753.

Another good source of analysis is PYPL. It is an index that is created by analyzing how often language tutorials are searched. PYPL places Scala on the 16th place worldwide (and 13th in the US).

RankLanguageShare
1Java24.1%
4C#8.8 %
12Ruby2.3%
15Perl1.1%
16Scala0.9%

Some would argue being #16 is not that good, but keep in mind that all top 17 languages from this list are essentially mainstream.

Checking the job market

What about jobs? Well, this is probably the most interesting part. If you take all popular functional languages and build a trend on indeed.com, you will see the following:

Indeed trends

Yep, Scala is 8 times bigger in terms of jobs than any other functional language. Another interesting observation is that Scala was at their level in 2009-2010:

Indeed trends (Old)

This correlates very well with the number of monthly contributors on OpenHub.com:

Monthly contributors on OpenHub.com

Here, instead of 8x advantage, Scala is only 3 times more popular than the others, but note that the pattern is the same. Scala was at the level of other functional languages in 2009, but made a significant progress in recent years.

The real numbers

OK, this is actually pretty interesting but what about real numbers? What if we want to compare Scala with some bigger languages? I heard somewhere that Scala takes about 1% of the Java world. Well, Java is the most popular language, but as it turns out on Indeed.com the difference is not that huge:

LanguageJobsRatio
Java93,27118.1
Python47,7129.3
C#43,5098.5
Ruby22,0354.2
PHP19,4033.8
Scala5,1511.0

There are several things worth mentioning. First, Java is only 18x more popular - not 1000x, not 100x, only 18x. Second, the closest mainstream languages are Ruby and PHP and both have only 4 times more jobs that Scala.

I tried similar searches on Dice, Monster and StackOverflow Jobs and found out that Scala is doing even better there:

LanguageStackOverflowDiceMonster
Java268 (4.3x)1026 (8.8x)1000+
Python200 (3.2x)654 (5.6x)1000+
C#90 (1.5x)196 (1.7x)740
Ruby118 (1.9x)328 (2.8x)1000+
PHP99 (1.6x)175 (1.5x)848
Scala62117587

For Dice and Monster, I limited the search to include only San Francisco, but hopefully it doesn't distort the results too much.

Conclusions

For me, it's clear that Scala has already entered the mainstream and the language is on the right track to get even more market share in the nearest future. I wanted to write something about Scala myths, but then I found out that Manuel Bernhardt already debunked them in his fantastic blog post 5 years of Scala and counting.

If you think that Scala is worth learning, you will probably find my books useful. For a more general discussion about learning Scala take a look at this blog post.