Scala 2.13 release candidate offers up new language refinements

Share
  • April 15, 2019

As we await the release of Scala 2.13, welcome the first 2.13 release candidate: Scala 2.13.0-RC1.

Scala-lang “combines object-oriented and functional programming in one concise, high-level language.” Its “static types help avoid bugs in complex applications, and its JVM and JavaScript runtimes let you build high-performance systems with easy access to huge ecosystems of libraries”. In May 2018, the language rose up and re-entered the TIOBE Index top 20. Its creator Martin Odersky pointed out, back in 2016: “Functional programming is just catching up in the industry.”

Scala 2.13.0-RC1 

Presenting the first v2.13 release candidate: Scala 2.13.0-RC1. This new milestone adds refinements and improvements to the language in preparation for the next big release. It also changes the license to Apache 2.0.

All libraries available for RC1 are added here to the release notes on GitHub. Users can subscribe to tickets and find out when they are available.

Lightbend software engineer Seth Tisue writes about the recent changes on GitHub. According to him, here is what’s new:

Collection changes

  • 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)

Language changes

  • 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)

Compiler changes

  • 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)

SEE ALSO: It can only get better: How not to turn restructuring into a panic attack

For more information on deprecations and linting and other changes, see the repo on GitHub.

Awaiting 2.13

Take a look at the previous pre-release milestones on GitHub and the significant changes they made to the language.

Scala 2.13.0-M1

  • #5603: Parallel collections removed from scala-library and changed to a separate module.
  • #5790: Unbundles scala-library-all, scala-swing, scala-parser-combinations.
  • #5683: Removal of deprecations
  • #5698: Eliminates non-matching overloads early for partial function literals
  • #5548: Fixed a bug issue and adds Java 1.6 and Java 1.8 java.lang.Math methods into scala.math package.
  • #5830: Several cut internal dependencies in preparation for additional modules.

Scala 2.13.0-M2

  • #5903: REPL renovations, including cleaner internal implementation, multi-line editing, and syntax highlighting.

SEE ALSO: Gitpod enters the stage: New IDE for GitHub projects

Scala 2.13.0-M3

  • Added supports for literal types and improves the compiler, adding better support for typelevel programming.
  • The standard library now adheres to the compact1 profile, and reduces the deployment footprint of Scala applications.
  • -Xsource:2.13 is enabled by default

Scala 2.13.0-M4

  • Improved and simplified collections library for more efficient user code compiling, including transformation methods no longer have an implicit CanBuildFrom parameter.
  • Simplified type hierarchy.
  • scala.Seq is an alias for scala.collection.immutable.Seq
  • Simplified views
  • to(Collection) method replaces to[Collection] method
  • .view and .to(Collection) replaces collection.breakOut
  • New immutable hash set and hash met implementation.
  • Added immutable.ArraySeq and immutable.LazyList
  • Deprecated collections removed

The post Scala 2.13 release candidate offers up new language refinements appeared first on JAXenter.

Source : JAXenter