Scala 3.0, an upgrade to the object-oriented, functional Scala language that started out on the JVM, is expected in early 2020, anchored by a next-generation compiler platform known as Dotty.
In fact, Dotty will become Scala 3.0, said Scala language founder Martin Odersky. Dotty has been centered on simplification, with extraneous syntax such as XML literals removed. Dotty also tries to slim down Scala types into a smaller set of fundamental constructs.
Planned new features in Scala 3
Objectives for the Scala 3 release include:
- Becoming more opinionated by promoting idioms that have worked well.
- Consolidation of constructs to improve consistency, ergonomics, performance and safety.
- Simplicity where it can be implemented.
- Ridding the language of inconsistencies and “surprising” behavior.
For tools support, the Scala 3 compiler,
dotc, has been used to compile itself and a set of libraries. A REPL (read-eval-print loop) is supported by the compiler also. IDE support is provided by having
dotc use the Language Server Protocol. Scala 3 support also will be available in the JetBrains IntelliJ IDE via a plugin.
How Scala 3 compares to Scala 2
The intent is to publish Scala 3.0 after Scala 2.14, which will feature migration to version 3.0, featuring tools, shim libraries, and targeted deprecations. Scala 2.13 is due in a few months, and Scala 2.14 will follow that likely in 2019.
Scala 2 and 3 are fundamentally the same, although the compiler is new, Odersky said. But Versions 2 and 3 are not binary-compatible. Version 3 can use Scala 2 artifacts, and both versions share the same standard library. You can also cross-build code for Scala 3 and 2; a guide will define a shared language subset to be compiled under both releases. The
-language:Scala2 option in the Scala 3 compiler lets it compile most Scala 2 code.
Where to download Scala
You can download Scala 2.12.5, the current version, from the Scala-lang.org website.