Work in Progress

We are still in the process of writing the documentation for Scala 3. You can help us to improve the documentation.

Are you searching for the Scala 2 documentation?

Scala 3 Migration Guide

Runtime

Language

Scala 2.13 and Scala 3 share the same Application Binary Interface (ABI).

The ABI is the representation of Scala code in bytecode or Scala.js IR. It determines the run-time behavior of Scala programs.

Compiling the same source code with Scala 2.13 and Scala 3 produces very similar bytecodes. The difference being that some features have changed, for instance the initialization of lazy vals has been improved.

Sharing the ABI also ensures that Scala 2.13 and Scala 3 class files can be loaded by the same JVM class loader. Similarly, that Scala 2.13 and Scala 3 sjsir files can be linked together by the Scala.js linker.

Furthermore it relieves us from surprising behaviors at runtime. It makes the migration from Scala 2.13 to Scala 3 very safe in terms of run-time crashes and performance.

At first sight the run-time characteristics of a Scala program is neither better nor worse in Scala 3 compare to Scala 2.13. However some new features will help you optimize your program:

Contributors to this page: