Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Scala Highlights from 2024 #1744

Merged
merged 9 commits into from
Feb 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 248 additions & 0 deletions blog/_posts/2025-02-04-highlights-2024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
---
layout: blog-detail
post-type: blog
by: The Scala Organization
title: Scala Highlights from 2024
---


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 all the parts of the Scala organization: the Scala Center, LAMP, Akka, and VirtusLab.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
The newsletter 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.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
Future issues will cover quarterly highlights.

A few of the highlights covered in this issue:

- [Named tuples in Scala 3](#named-tuples-and-other-scala-3-improvements)
- [Experimental WebAssembly backend in Scala.js](#experimental-webassembly-backend-in-scalajs)
- [Multi-threading support in Scala Native](#multi-threading-support-in-scala-native)
- [Scala CLI as the new default runner for Scala](#scala-cli-as-the-new-default-runner-for-scala)
- [Scala 3 build definitions in sbt 2.x (beta)](#scala-3-build-definitions-in-sbt-2x-beta)
- [Better Scala 3 support in IntelliJ Scala Plugin](#improvements-in-intellij-scala-plugin)
- [Best-effort compilation in Metals](#best-effort-compilation-in-metals)
- [New “Scala Governance” and “Scala Development Guarantees” web pages](#governance)

## Language and compilers

### Named tuples and other Scala 3 improvements

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.

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.

Further reading:

- [Named tuples documentation (experimental)](https://dotty.epfl.ch/docs/reference/experimental/named-tuples.html)
- [Scala 3.5 announcement](https://scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html)
- [Scala 3.6 announcement](https://scala-lang.org/news/3.6.2/)

### Scala 2 maintenance

We remain committed to maintaining Scala 2 and publishing new versions as needed.

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.

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.

Further reading:

- [Scala 2 maintenance plans blog post](https://www.scala-lang.org/blog/2024/12/16/scala-2-maintenance.html)
- Release notes: [2.13.16](https://github.com/scala/scala/releases/tag/v2.13.16), [2.13.15](https://github.com/scala/scala/releases/tag/v2.13.15), [2.13.14](https://github.com/scala/scala/releases/tag/v2.13.14), [2.13.13](https://github.com/scala/scala/releases/tag/v2.13.13)

### Experimental WebAssembly backend in Scala.js

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](https://www.scala-js.org/doc/project/webassembly.html#language-semantics).

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](https://www.scala-js.org/doc/project/webassembly.html#supported-engines).
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](https://www.scala-js.org/doc/project/webassembly.html#language-semantics) in the Scala.js documentation.

Further reading:

- [Scala.js 1.17 release notes](https://www.scala-js.org/news/2024/09/28/announcing-scalajs-1.17.0/): Experimental Web-Assembly backend and more.
- [Scala.js 1.16 release notes](https://www.scala-js.org/news/2024/03/19/announcing-scalajs-1.16.0/): Scala.js-specific minifier and more.

### Multi-threading support in Scala Native

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`.

adpi2 marked this conversation as resolved.
Show resolved Hide resolved
For more details about the multi-threading support in Scala Native, check out the [Scala Native 0.5 release notes](https://scala-native.org/en/stable/changelog/0.5.x/0.5.0.html).
It also contains the initial support for 32-bit architectures, and more.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved

## Developer experience

### Scala CLI as the new default runner for Scala

[Scala CLI](https://scala-cli.virtuslab.org/) 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 default runner in the Scala distribution.
You can install it as `scala` using Coursier, or popular package managers such as Homebrew or SDKMAN!.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
Check out the default installation for your system on [scala-lang.org/download](http://scala-lang.org/download).

This is a game-changer for the Scala runner, 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](https://scala-cli.virtuslab.org/) to discover its full power.

### Scala 3 build definitions in sbt 2.x (beta)

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](https://github.com/sbt/sbt/wiki/sbt-2.x-plugin-migration), or directly on [Scaladex](https://index.scala-lang.org/search?platform=sbt2.0.0-M3&q=*).
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` and `packageBin` rewritten to cached tasks
- `test` 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](https://eed3si9n.com/sbt-2.0.0-M3).

### Improvements in IntelliJ Scala Plugin

*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.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
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](https://blog.jetbrains.com/scala/2024/11/19/new-module-layout-for-sbt/).

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 much work to do, the latest IntelliJ Scala Plugin can now import most Scala 3 projects effectively.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
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](https://blog.jetbrains.com/scala/2023/12/21/the-x-ray-mode/), enabling inlay hints to reveal inferred types, parameter names, and implicit arguments
- Experimental support for transparent inline methods ([2024.3](https://blog.jetbrains.com/scala/2024/11/13/intellij-scala-plugin-2024-3-is-out/#transparent-inline-methods-experimental))
- Support for named tuples ([2024.3](https://blog.jetbrains.com/scala/2024/11/13/intellij-scala-plugin-2024-3-is-out/#named-tuples))

As a further read, check out the [The IntelliJ Scala Plugin in 2024](https://blog.jetbrains.com/scala/2024/12/20/the-intellij-scala-plugin-in-2024/) post on JetBrains' blog.

### Best-effort compilation in Metals

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.
It’s an opt-in feature.
adpi2 marked this conversation as resolved.
Show resolved Hide resolved
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](https://scalameta.org/metals/blog/2024/02/07/bismuth/#bazel-support))
- Inlay hints ([v1.3.0](https://scalameta.org/metals/blog/2024/04/15/thalium/#inlay-hints-support))
- Go to implementations for dependency sources ([v1.3.0](https://scalameta.org/metals/blog/2024/04/15/thalium/#go-to-implementations-for-dependency-sources))
- Debugging for all build servers ([v1.3.3](https://scalameta.org/metals/blog/2024/07/12/thallium/#allow-debugging-for-all-build-servers))
- Release of Bloop 2 ([v1.4.0](https://scalameta.org/metals/blog/2024/10/24/palladium/#bloop-2))

## Governance

One of the Scala organization’s 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](https://github.com/scalacenter/advisoryboard/blob/main/proposals/033-deprecate-scala-ide.md): Deprecate Eclipse Scala IDE
- [SCP-032](https://github.com/scalacenter/advisoryboard/blob/main/proposals/032-scala-version-guidance.md): Provide guidance on choosing between Scala LTS and Next
- [SCP-030](https://github.com/scalacenter/advisoryboard/blob/main/proposals/030-governance-page.md): Governance page for Scala

Further reading:

- [Scala Governance](https://www.scala-lang.org/governance/)
- [Scala Development Guarantees](https://www.scala-lang.org/development/)
- [Scala 2 maintenance plans](https://www.scala-lang.org/blog/2024/12/16/scala-2-maintenance.html)

## 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.

The Scala organization’s 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](https://summerofcode.withgoogle.com/programs/2024/organizations/scala-center)
- Advent of Code, as described in [this recent blog post](https://www.scala-lang.org/blog/2025/01/16/advent-of-code-recap.html)

The Center will [participate in GSoC again](https://scala-lang.org/blog/2025/01/28/gsoc-projects.html) in 2025.

As always, we publish a schedule of upcoming (and past) conferences at <www.scala-lang.org/events>.

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](https://scalac.io/blog/scalendar-january-2025/).
You can also get news about upcoming events on the #events channel of the [Scala Discord](https://discord.com/invite/scala) chat server.

One currently active Scala podcast is [Scala Space](https://www.youtube.com/channel/UCTuqr7682y0sZ7Fp5dTMLiw).
If you’re doing a Scala podcast, please make sure it’s listed on our [community page](https://www.scala-lang.org/community/).
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 to 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:

- [Scala Center home page](https://scala.epfl.ch/)
- [Joining the Advisory Board](https://scala.epfl.ch/corporate-membership.html)
- [5 Year Impact Report](https://scala.epfl.ch/records/first-five-years/)