With a more ambitious vision of its future, Typesafe released version 2.10 of Scala on Jan. 4, adding macros for the first time. The macros allow compile-time metaprogramming to be used by developers, letting them write macros that are read and enacted by the compiler at compile-time.
Mark Brewer, CEO of Typesafe (the company that services and supports Scala), said that he was anxious to release version 2.10 because “it’s such a big piece of new functionality.” While this release contains numerous other fixes and additions, the new macros are only in their first, preliminary incarnation. Thus, Brewer and his team are awaiting feedback from users who’ve tried macros for the first time.
Elsewhere in this release, Scala 2.10 contains a pattern matcher written from scratch. This allows the code-generation and analysis tools to be uncoupled, and to run independently of one another.
Scala itself has become a bit more uncoupled with this release as well. With a new modularized feature set, advanced features can be explicitly imported. For developers interested in using Scala with Akka (a middleware framework), existing Scala actors have been deprecated and replaced with Akka-specific actors.
The Eclipse-based Scala IDE has also been updated to support Scala 2.10, and can be downloaded as a grouped bundle from the Scala IDE website.
For Typesafe, the future of Scala is mostly about driving adoption. While these new features are sure to please existing Scala users, there are still plenty of Java developers out there who aren’t yet using the language, said Brewer.
“I think it’s a reality of where we’re seeing the majority of our customers come from,” he said, explaining Typesafe’s focus on the Java community. “It’s a fairly big leap to jump to Scala, but if you look at the masses of Java developers, they’re looking for something cool, something new to write an application that can’t get done today (with Java). We’ll continue to see people make the adoption of Scala because they need the functional performance capabilities, but that’s not the only way they’ll adopt Scala.”
One way Typesafe hopes Scala adoption will be driven is through the Play framework. This Web development framework is compatible with both Java and Scala, and by supporting it at the corporate level (through offering enterprise support in particular), Brewer hopes to build interest in Scala within the Java community.
“The most important thing is to add more developer value around Scala, through tutorials, sample applications, and online-based courses,” he said. “We want to do that for Play as well. That also means support all the other things developers need in their Java environment: Gradle, Maven or bug-tracking systems. We need to make sure it’s easy for anyone who adopts Play to use Java or Scala.”