Welcome to the first edition of Scala Highlights, a new quarterly newsletter showcasing technical achievements, online resources, and community news.
The newsletter is a joint effort by the Scala Center, LAMP, Akka, and VirtusLab, the four core organizations involved in the Scala language development. It also covers our collaborations with other parties, such as the Scala Center’s advisory board.
This inaugural issue is special as it offers a recap of 2024, celebrating the year’s most significant advancements and their impact on the Scala ecosystem. Future issues will cover quarterly highlights.
A few of the highlights covered in this issue:
- Named tuples in Scala 3
- Experimental WebAssembly backend in Scala.js
- Multi-threading support in Scala Native
- Scala CLI as the new default runner for Scala
- Scala 3 build definitions in sbt 2.x (beta)
- Better Scala 3 support in IntelliJ Scala Plugin
- Best-effort compilation in Metals
- New “Scala Governance” and “Scala Development Guarantees” web pages
Language and compilers
Named tuples and other Scala 3 improvements
Led by LAMP, the Scala open source team at VirtusLab, the Scala team at Akka and the Scala Center
In 2024 we released two new Scala Next versions: 3.5 and 3.6. Scala Next is the version we recommend for most Scala 3 users.
Scala 3.5 introduces support for var
in refinements, binary integer literals, and experimental named tuples.
Named tuples is a significant addition to the language as it allows to give meaningful names to tuple elements.
These names can be used during construction, selection and pattern matching.
The banner change in Scala 3.6 is the new syntax for context bounds and givens, improving both power and ergonomics.
Scala 3.6 also includes support for multiple type parameter lists, and improvements to for
desugaring.
Note that the Scala 3.3 line remains the current Scala LTS (Long Term Support) version, recommended for use by library authors. Most bug fixes are backported to the LTS line. Some time this year, we expect to announce plans for the next LTS version.
Further reading:
Scala 2 maintenance
Led by the Scala team at Akka
We remain committed to maintaining Scala 2 and publishing new versions as needed.
Scala 2.13 improvements are mostly in the areas of JDK compatibility, warnings and lints, and aligning with Scala 3, especially under the -Xsource:3
flag.
Sometime this year, we expect to start making additions to the Scala 2.13 standard library (which is shared with Scala 3). The scope of these additions remains to be seen. Initially, additions will be minor, focused on performance overrides and on addressing oversights in the collections API.
Scala 2.12 is now under minimal maintenance. It is not EOL yet primarily because sbt 1.x, which requires 2.12, is still in wide use.
Further reading:
- Scala 2 maintenance plans blog post
- Release notes: 2.13.16, 2.13.15, 2.13.14, 2.13.13
Experimental WebAssembly backend in Scala.js
Led by the Scala Center and the Scala open source team at VirtusLab
Starting with 1.17.0, Scala.js introduces an experimental WebAssembly (Wasm) backend. It is designed to be a drop-in replacement for the usual JavaScript backend, albeit with a few current limitations.
The key benefits of using the Wasm backend are:
- Remarkable run-time performance for use cases with minimal JS interop
- Compact binary format that keeps artifact sizes small, although we don’t support any Wasm-specific code size optimizer yet
Supported engines include Node.js 23, Chrome and Firefox, all using some experimental flags. Support for standalone Wasm, that can run outside the JavaScript environment, is a work-in-progress.
To try out the Wasm backend in your Scala.js project, check out the setup section in the Scala.js documentation.
Further reading:
- Scala.js 1.17 release notes: Experimental Web-Assembly backend and more.
- Scala.js 1.16 release notes: Scala.js-specific minifier and more.
Multi-threading support in Scala Native
Led by the Scala open source team at VirtusLab
Scala Native 0.5 introduces an implementation of java.lang.Thread
based on system threads, along with Scala and Java concurrency primitives.
It provides support for synchronized blocks, @volatile
annotations, final fields, and includes thread-safe implementations of most classes in java.util.concurrent
, scala.concurrent
and scala.collection.concurrent
.
The support is solid enough to allow the Scala parallel collections library to work on Native without code changes.
For more details about the multi-threading support in Scala Native, check out the Scala Native 0.5 release notes. It also contains initial support for 32-bit architectures, and more.
Developer experience
Scala CLI as the new default runner for Scala
Scala CLI is powered by the Scala open source team at VirtusLab, with the new default runner contributed by LAMP and the Scala Center.
Scala CLI is a popular tool for developing Scala scripts and single-module projects. It allows lightning-fast running and testing of Scala code. It can even publish single-module projects to Maven Central without involving a separate build tool.
In 3.5.0, it became the scala
command in the default Scala distribution.
You can install it as scala
using Coursier or popular package managers such as Homebrew or SDKMAN!.
Check out the default installation for your system on scala-lang.org/download.
This is a game-changer for the scala
command, as it introduces using
directives to configure Scala files with compiler options, library dependencies and more.
Additionally, it offers built-in support for Scaladoc generation, the Scala REPL, Scalafmt, Scalafix (coming soon), Scala.js and Scala Native.
And it fully supports both Scala 3 and Scala 2.
Check out the Scala CLI documentation to discover its full power.
Scala 3 build definitions in sbt 2.x (beta)
sbt 2.x is developed and overseen by Eugene Yokota, with contributions from the Scala Center.
Eugene Yokota, in collaboration with the Scala Center and community contributors, released sbt 2.0.0-M3, a new beta version of sbt 2.x, powered by Scala 3.
This release enables build.sbt
files to be written in Scala 3.
User code can still be in any version of Scala.
To try it out, update the sbt version in your project/build.properties
file as follows:
sbt.version=2.0.0-M3
While this beta release is exciting, keep in mind that most sbt plugins are not yet compatible with sbt 2.0.0-M3. You can track the progress of the plugin migration on this wiki page, or directly on Scaladex. To help cross-building the sbt plugin ecosystem, check out the Migrating from sbt 1.x guide.
Other key improvements in sbt 2.x include:
- local/remote cache system that is Bazel-compatible.
compile
andpackageBin
rewritten to cached taskstest
changed to incremental test with caching- up to 40% improvement in loading times compared to sbt 1.10.x
- in-sourced project matrix
- extension of the slash syntax to support query of sub-projects
To learn about these new features and more, check out the sbt 2.0.0-M3 announcement.
Improvements in IntelliJ Scala Plugin
Led by the IntelliJ Scala plugin team at JetBrains
In 2024, the IntelliJ Scala Plugin introduced a new sbt layout which creates separate main
and test
modules for each sbt project.
This change allows for different compiler options in each scope and improves the representation of dependencies.
To enable this feature you can follow the guide in this blog post.
The team improved the support for Scala CLI. Developers can now select Scala CLI as the build system when creating new projects. In addition, IntelliJ automatically recognizes it when importing existing Scala CLI projects. Other minor enhancements are planned for future releases.
Throughout 2024, the Scala 3 support improved steadily with each release. Although there is still work to do, the latest IntelliJ Scala Plugin can now import most Scala 3 projects effectively. Furthermore, Scala 3.3.x LTS is now selected as the new default version when creating new projects.
Other major updates from 2024 include:
- X-Ray Mode, enabling inlay hints to reveal inferred types, parameter names, and implicit arguments
- Experimental support for transparent inline methods (2024.3)
- Support for named tuples (2024.3)
As a further read, check out the The IntelliJ Scala Plugin in 2024 post on JetBrains’ blog.
Best-effort compilation in Metals
Led by the Scala open source team at VirtusLab
Our main focus with Metals has been stability, to provide a smoother experience for Scala developers. One of those efforts has been implementing best-effort compilation for Scala 3.
Best-effort compilation allows Metals to provide the most up-to-date information, for things such as autocompletion even in broken code that fails to compile.
Since this is a big change, we are still making sure everything works correctly.
The feature remains opt-in for now.
To try it out you can start Metals with -Dmetals.enable-best-effort=true
, or if using VS Code put that into metals.serverProperties
.
A more limited version is implemented for Scala 2. It is based on outline compilation, which only compiles signatures. The main limitation is that it only works inside the broken module, not in its dependent modules.
Other major improvements in Metals this year include:
- Bazel support (v1.2.1)
- Inlay hints (v1.3.0)
- Go to implementations for dependency sources (v1.3.0)
- Debugging for all build servers (v1.3.3)
- Release of Bloop 2 (v1.4.0)
Governance
One of our major efforts this year was to establish, formalize, and document our own operations, as well as the policies governing releases of the Scala language, as seen on the pages linked below. These updated structures guide the development of Scala 3, and we’ve also documented our plans for ongoing maintenance of Scala 2.
The Scala Improvement Process (SIP) also continues to operate, holding monthly meetings and leading discussions of proposed features on the Scala Contributors forum. In a future issue of this newsletter, we’ll highlight the committee’s handling of recent language proposals.
The Scala Center‘s advisory board continues to meet quarterly. We were delighted to add JetBrains to the board this year.
Proposals to the Center can be made directly by member companies or through the two community representatives (currently Zainab Ali and Eugene Yokota). In 2024, the following proposals were completed:
- SCP-033: Deprecate Eclipse Scala IDE
- SCP-032: Provide guidance on choosing between Scala LTS and Next
- SCP-030: Governance page for Scala
Further reading:
Community and events
The Scala community is at the heart of Scala’s health and vitality. It’s exciting to see how much activity (conferences, meetups, podcasts, and more) is occurring, and we encourage everyone to participate, to grow enthusiasm around Scala.
Our own community efforts this year included:
- Google Summer of Code: 10 new contributors, 10 successful projects, as detailed in the Scala Center page on GSoC website
- Advent of Code, as described in this recent blog post
The Center will participate in GSoC again in 2025.
As always, we publish a schedule of upcoming (and past) conferences, with links, on our Events page.
Though the Scala meetup and conference scene was dealt a heavy blow by COVID, now in 2024 we see it recovering. We’re especially pleased to see Scala-specific conferences such as Scala.IO (Paris), Scala Matsuri (Tokyo), Scalar and Art of Scala (Warsaw), and Functional Scala (virtual) continuing. Most of the conference websites have published talk videos.
To learn about meetups worldwide, see Scalac’s monthly Scalendar newsletter. You can also get news about upcoming events on the #events channel of the Scala Discord chat server.
One currently active Scala podcast is Scala Space. If you’re doing a Scala podcast, please make sure it’s listed on our community page. The community page also has many useful links to newsletters, learning materials, and other resources. Pull requests to this page from the community are welcome.
How you can support Scala
The Scala Center is the Scala language foundation coordinating Scala governance, community, education, and open source development.
The Center contributes to the core language and to open source Scala tooling and libraries, and it delivers high-quality education materials. It fosters conversations in the community and coordinates with various parties to unblock and improve the Scala ecosystem.
Joining the Center’s Advisory Board is an effective way to participate in Scala governance and have your voice heard, as well as supporting the Center to achieve its goals.
For more information: