Scala 3 moves to release candidate stage

Posted on 22-02-2021 , by: admin , in , 0 Comments

Scala 3, the planned next version of the object-oriented, functional language with JVM and JavaScript runtimes, has moved to a release candidate stage, with type parameter ehhancements and syntax improvements.

The Scala 3 RC, introduced February 17, brings last-minute polishing and cleanups. The user experience was improved and the metaprogramming framework enhanced. Scala has both JVM and JavaScript runtimes and is positioned for use in building high-performance systems with access to ecosystems of libraries.

Improvements in Scala 3 RC 1 include:

  • Type parameters on extensions can be combined with type parameters on the methods themselves.
  • Changes to the import syntax have been made, whereby the wildcard import _ is replaced by * and the renaming operator => is replaced by as.
  • The syntax of vararg splces has been changed in patterns and function arguments. The new syntax uses a postfix * instead of : _*, analogous to how a vararg parameter is declared.
  • Beginning with RC 1, Scala no longer generates a function parent for companions of case classes

Prior to the release candidate, improvements featured in Scala 3 have included:

  • Compiler optimizations.
  • Support for the Scala.js JavaScript implementation of Scala, including support for non-native JS types and better support for JS interoperability.
  • For pattern bindings, as is allowed in place of @. As of Scala 3.1, the @ syntax will be deprecated.
  • In a syntactic change intended to simplify code, instead of developers using import p.{given _}, they will use import p.given.
  • The metaprogramming API has been made more uniform.