State of Scala survey 2022

Picture of Szymon Rodziewicz, Scala Compiler Developer

Szymon Rodziewicz

Scala Compiler Developer

10 minutes read

The 2022 year is slowly coming to an end, and it’s high time to share the Scala survey’s results and analysis. This year the questions focused mainly on the status of the ecosystem, the perception of libraries, and how Scala is being used. To see the aggregated results, you can visit the scala-lang page.

Scala survey 2022: The Respondents

The State of Scala 2022 survey was conducted in October and attracted 2236 responses, mostly from Scala developers.
According to the survey’s results, a majority of respondents use Scala 2.13 as the main version. Notably, 40% said that they use Scala 3 rather than Scala 2. We are happy to report that this number is even bigger than we hoped for and tells us that Scala 3 adoption is growing rapidly.

Almost everyone targets the JVM platform. However, many Scala users selected the platforms Scala.js and Scala Native. Since 2019 Scala.js has grown by 1.3% and Scala Native by 4.5%. Keep in mind that sample differences may have contributed to this observation.

Scala survey 2022: How Scala is used

The most popular Scala paradigm is immutability. Over 95% of respondents stated that they use immutable vals, collections, and data structures often (>= 4). The purely functional approach using dedicated libraries was selected by almost 80% of respondents, frequently (>= 3). For the same threshold, 65,5 % of respondents selected the object-oriented approach. Mutable vars, collections, and data structures are used rarely, with over 80% of responses being 2 or lower.

The most widely used new Scala 3 features are the enums, extension methods, and top-level definitions. Union types and opaque type aliases are employed less frequently, but most respondents still use them quite often. Exports are the only new feature that appears to be lacking significant adoption.

Scala survey 2022: The Ecosystem

In the survey, we attempted to measure the perception and spread of various ecosystems, such as com.lihaoyi, Typelevel, ZIO, and other libraries. We will refer to the concept of the user retention ratio. This means, the ratio of responses signaling the number of users, who use the library, compared to the number of users that were using it in the past but discontinued it. A high user retention rate shows that the library either already has a strong standing in the community or has the potential to become a favorite.

com.lihaoyi ecosystem

50% of the respondents knew libraries from the com.lihaoyi ecosystem. The most widely used ones are PPrint and uPickle. Both have significantly high user retention ratios. The PPrint user retention ratio is 30:1, and uPickle is 4:1. Os-Lib, a Scala Toolkit library, had the second-highest user retention ratio, being 17:1.

Typelevel ecosystem

Almost every respondent recognized cats-core and cats-effect. Moreover, over 50% of survey participants used these libraries. They also have a significantly large user retention ratio at, respectively, 14:1 for cats-core and 8.5:1 for cats-effect. Other libraries that are notably well-recognized and liked are http4s and fs2.

ZIO ecosystem

ZIO ecosystem stands out, with many respondents declaring willingness to test it in the future. However, these libraries received a lower but significant percentage of responses stating that respondents are unwilling to use them despite never having tried them. ZIO and ZIO-streams, the most popular components of the ecosystem, scored high in the user retention ratio with 15:1 for ZIO and 13:1 for ZIO-streams.

Akka ecosystem

Most respondents recognized Akka library in the survey. However, it has a highly controversial sentiment as it has a 1:1 user retention ratio.

Other ecosystems

Spark and Kafka are both widely used and well-liked libraries. Most notably, Kafka has a survey-wide record of a user retention ratio of 43:1.

Front-end development

The most popular front-end libraries for Scala in this survey were Laminar and scalajs-react. Laminar has the highest user retention ratio.

Testing frameworks

ScalaTest and ScalaCheck are the most widely used testing frameworks. Interestingly, the highest user retention ratio belongs to the MUnit. This is good news, as MUnit will be a part of the Scala Toolkit.

Various libraries

Pureconfig, sttp, Gatling, and tapir received many responses stating that the respondents were using them. Among them, tapir, despite being popular, has many programmers willing to test it.

IDEs

Unsurprisingly, the most popular IDE is IntelliJ IDEA. However, a significant number of respondents said that they use VS Code with Metals, and a considerable number want to give them a shot.

Build tools

Sbt is the most widely used build tool. It has a significantly large user retention ratio, slightly below 9:1. 20% of the respondents are already using scala-cli, while over 50% use it or are planning to. Yet still, over 30% don’t recognize it.

Linting/code quality

Over 80% of respondents use scalafmt. The compiler warnings are the second most popular selection for linting, and the third one is scalafix. It’s important to note that they do not have fully overlapping feature sets, so these statistics are likely a result of respondents using them together in the same projects.

Areas requiring improvement the most

In the survey, we asked respondents to select up to 3 aspects of working in Scala that they would like to see improved. The most important one was the Compile and build speed. The next two that follow are tooling and memory usage. It’s exciting to see Scala Native with 20% of respondents voting for it – especially given its current rapid development.

Scala survey 2022: Background of respondents

The most popular languages used by the respondents besides Scala are Java, Python, and JavaScript. Given that Interop with Java and JavaScript is already here, it may be interesting to see some work done in the area of working with Scala and Python.

The respondents mostly use Scala for web applications, data processing, and writing libraries and frameworks. They work primarily in projects with 10k to 100k lines (40.8%) of code and corporations with 101 to 1000 employees (33.2%). Most respondents are based in the United States, the United Kingdom, and Poland.

Liked the article?

Share it with others!

explore more on

Take the first step to a sustained competitive edge for your business

Let's connect

VirtusLab's work has met the mark several times over, and their latest project is no exception. The team is efficient, hard-working, and trustworthy. Customers can expect a proactive team that drives results.

Stephen Rooke
Stephen RookeDirector of Software Development @ Extreme Reach

VirtusLab's engineers are truly Strapi extensions experts. Their knowledge and expertise in the area of Strapi plugins gave us the opportunity to lift our multi-brand CMS implementation to a different level.

facile logo
Leonardo PoddaEngineering Manager @ Facile.it

VirtusLab has been an incredible partner since the early development of Scala 3, essential to a mature and stable Scala 3 ecosystem.

Martin_Odersky
Martin OderskyHead of Programming Research Group @ EPFL

VirtusLab's strength is its knowledge of the latest trends and technologies for creating UIs and its ability to design complex applications. The VirtusLab team's in-depth knowledge, understanding, and experience of MIS systems have been invaluable to us in developing our product. The team is professional and delivers on time – we greatly appreciated this efficiency when working with them.

Michael_Grant
Michael GrantDirector of Development @ Cyber Sec Company