Select the directory option from the above "Directory" header!

Menu
Scala 3 moves to release candidate stage

Scala 3 moves to release candidate stage

Type parameters, syntax get attention in planned upgrade to the popular functional language for JVM and JavaScript runtimes

Credit: Kevin (C00)

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 enhancements and syntax improvements.

The Scala 3 RC, introduced February 17, brings last-minute polishing and cleanups. The user experience was improved and the meta-programming 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. In addition, 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 also 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 optimisations and 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. Furthermore, the metaprogramming API has been made more uniform.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags javascript

Show Comments