Scala 2.13 has been pre-released and is almost here. It is a library release which means the language itself won’t see much changes. The main goal behind this version is to make the performance of the compiler faster, simplifying the collections, modularising the standard library as well as more user-friendly.
Scala 2.13.0-RC1 is the first release candidate of version 2.13 which has been released on 8th April 2019 by software engineer on the Scala compiler team at Lightbend, Seth Tisue. As usual for Scala pre-releases, RC1 is not binary compatible with any other Scala version, including 2.13 milestones. The license has also changed to Apache 2.0. Also, if no major problems are found in this release candidate, it will be re-released as 2.13.0.
The Collection Changes are
- Integrate converters from scala-java8-compat (#7458)
- Make unified collection serialization opt-in instead of opt-out (#7624)
- New mutable.HashSet and mutable.HashMap implementations (#7348)
- Add CollisionProofHashMap, a mutable hashmap that degrades to red-black trees in the worst case (#7633)
- Change LazyList to always evaluate elements in order, and to have lazy empty-or-not status (#7558)
- Improved performance of small Vectors (#7743)
- Add immutable TreeSeqMap (a SeqMap implemented via a customized IntMap/HashMap pair) (#7146)
- Create trait collection.SeqMap (#7954)
The Language Changes are
- Accept underscore as numeric literal separator (#6989)
- Eta-expand 0-arity method if expected type is Function0 (#7660)
- x op () now parses as x.op(()) not x.op() (#7684)
- More precise inference for overloaded methods when arguments types align (#7631)
- Disallow repeated param except in method signature (#7399)
- By-name implicits: Align detection of implicit recursion with the SIP (#7368)
- Enforce explicit return type for macros (#6942)
The Compiler Changes are
- Extension methods of overloads are themselves overloaded (#7896)
- Emit mixin forwarders as bridges to avoid needing generic signatures (#7843)
- Upgrade to ASM 7 for improved JDK 12 compat (#7384)
- Make object fields static, and move post-super init to clinit (#7270)
- More capable inliner (#7133)
- Usability: compiler suggests possible names in NotAMemberError (#6711)
There are also other changes such as compiler option changes, concurrency changes, standard changes, deprecations, and linting, etc. Click here to view.
There is a saying “The more we get, the more we want”. Though the latest version of Scala is a few months away, we are already looking beyond the upcoming version. Dotty is the project name for technologies that are being considered for inclusion in Scala 3. Dotty uses the Scala Code of Conduct for all communication and discussion. Dotty comes built-in with the Dotty Language Server, an implementation of the Language Server Protocol (LSP), which means that any editor that implements the LSP can be used as a Dotty IDE. Currently, the only IDE we officially support is Visual Studio Code.
Dotty’s 14th released, Dotty 0.14.0-RC1 includes features such as new export (which means aliases for selected members of an object), the dual of import, immutable array type, etc. The motivation for these changes is to promote composition over inheritance. Though this version is going to be released after Scala Version 2.14 which will define targeted depreciations, migration tools, etc.
The main objectives of Scala 3.0 are mentioned below
- become more opinionated by promoting programming idioms we found to work well,
- simplify where possible,
- eliminate inconsistencies and surprising behaviors,
- build on strong foundations to ensure the design hangs well together,
- consolidate language constructs to improve the language’s consistency, safety, ergonomics, and performance.
Interest Overtime Graph Of Scala:
If you loved this story, do join our Telegram Community.
Also, you can write for us and be one of the 500+ experts who have contributed stories at AIM. Share your nominations here.
A Technical Journalist who loves writing about Machine Learning and Artificial Intelligence. A lover of music, writing and learning something out of the box. Contact: firstname.lastname@example.org