The next big Scala release is edging further down the roadmap, with the milestone release – Scala 2.12 M1 – released this week.

In Scala 2.12-M1, the experimental support for Java 8 that featured in version 2.11 has now been extended. Once the final Scala 2.12 is released (supposedly around January 2016) Java 8 lambdas and streams will be fully supported, bridging some significant gaps between the two languages. Whilst programs written in Scala 2.12, including the compiler, will only be executed in Java 8 or even newer, the current milestone (2.12.0-M1), still targets Java 6.

This Java 8 and beyond focus for Scala was first revealed last summer in the official Typesafe roadmap for Scala 2.12. In an interview with InfoQ, Adriaan Moors (Scala tech lead at Typesafe), explained that the decision came in part as a result of the instrumental role Java has played in Scala’s success and adoption. He commented that the company was, “keen to evolve with the platform to enjoy the improvements made to it and its ecosystem.”

Planned future Java 8-centric additions for Scala 2.12 include Java 8 style closures, which will allow the Scala compiler to emit closure classes (lambdas) just as you can with Java 8. There’s also planned lambda syntax for SAM types. Again, in Java 8 fashion, this lets you instantiate any type with one single abstract method by passing a lambda, improving the user experiences for libraries written for Java 8 in Scala.

“GenBCode” – the optimizer and backend introduced in Scala 2.11 – will eventually come as default. Alongside this, Scala 2.12 will feature a new inliner and bytecode optimizer.

Besides this, there haven’t been too many changes between 2.11 and 2.12-M1, and code without deprecation warnings that compiles on the former should also work on the latter. However, in order for the language team to keep renovating the Scala standard library, the release is not binary compatible with the 2.11 series.

It’s been an exciting year for Scala, with the language scaling up towards the TIOBE Index top 20 for the first time in 20 years, indicating a rise in popularity – or at least curiosity – in the language. Along with a slow uptick in enterprise experimentation, this increase could be partly attributed to the advent of the Scala.js compiler, which allows the language to be compiled to JavaScript for the first time.

If you’re curious for a taste of what future of the language will feel like, Scala 2.12.0-M1 is available now to download over at scala-lang.org and via Maven Central.

 

 

A New Milestone for Java 8-Oriented Scala: 2.12-M1 is Here

About The Author
- Editor of Voxxed.com, focusing on all things Java, JVM, cloud-y, methodical, future-fantastic, and everything in between. Got a piece of news, article or tutorial you'd like to share with your fellow Voxxians? Drop us a line at info@voxxed.com

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>