As early as 1999, Martin Odersky had begun to envision a programming language that merged functional programming with object-oriented programming, but he didn't want all the restrictions of Java, the language he had done much of his work with. What eventually emerged in 2003 was not an extension of Java, but a language that was completely interoperable with it.
Today, you know this language as Scala. And in its 10th anniversary year, we wanted to talk with the people who eat, sleep, and breathe Scala–the people at Typesafe. I had a great interview with Adriaan Moors, the Scala lead at Typesafe, so I'm going to just jump right into our talk:
What were some of the major events and changes around the Scala ecosystem and Typesafe this year?
Typesafe had a very busy 2012; we released version 2.10 of Scala, were selected as one of Gartner’s “Cool Vendors” in Application Development, welcomed a new CEO (Mark Brewer) and closed a significant enterprise deal with Juniper Networks. Additionally, the company successfully raised $14.5M in a series B funding round to fuel growth, doubled its headcount as a global company and welcomed Rod Johnson, founder of SpringSource, to the Board of Directors. In 2012, our founders and technology leads keynoted at more than 20 major tech conferences and hosted a sold-out Scala Days conference in London.
Typesafe also created a dedicated Scala team in San Francisco. Paul Phillips was already in the Bay Area, Grzegorz Kossakowski and I moved from Lausanne and we hired Jason Zaugg (in Lausanne) and James Iry, both well-known Scala contributors to round out the group. We also switched to GitHub and are receiving more and more contributions as a result.
The Scala IDE for Eclipse made a lot of progress and is now very usable. We’re still working hard on improving stability and responsiveness, but we use it ourselves on a daily basis on the significant codebase comprised by the Scala compiler and standard library.
Scala’s growth has shifted into a higher gear in the last 12 months, moving up the ranking on RedMonk’s language chart. Also, ThoughtWorks has moved Scala from the "Trial" category to "Adopt" (which according to them means they strongly that the industry should be adopting these items).
We’re also very proud to say that Scala creator, Martin Odersky, led Functional Programming Principles in Scala, a MOOCthat attracted over 50,000 registered students. The class was hugely successful and pointed to the rapidly growing interest in the language.
What were some of the main goals of Scala 2.10 and how did it do in achieving those?
- 2.10 was a feature release -- the compiler added:
- Value Classes (add methods to existing types without paying the object allocation cost)
- Implicit Classes (codifies a common pattern with implicit conversions that wrap objects of existing types to enrich their interface)
- String Interpolation (a common feature, but with a twist: it’s fully extensible)
- ASM-based backend (faster, adds 1.6/1.7 support)
- The Dynamic trait and dependent method types are fully supported.
- Macros & Reflection (experimental)
- Scala is much more than the compiler, of course -- our standard library added:
- Futures and Promises (collaboration between EPFL’s Scala team, the Akka team at Typesafe with input from Twitter)
- Akka actors in the standard distribution
- We also spent a lot of time thinking about simplicity.
- Scala’s goal is to distill powerful features down to their essence, and unify them so that they work well together (e.g., functions and objects, implicit classes and value classes, type inference and implicit search,...).
- Scala 2.10 introduces a feature to control which advanced features your project uses, so you can code with confidence.
- Our goal was to add these new features “before it’s too late.” What I mean by this is, with Scala adoption accelerating so significantly, we anticipate 2.11 to become more conservative about introducing new features. I think 2.10 had the perfect mix of new features and there is already a lot of excitement around the 2.10.0 release (2.10.1-RC1 is scheduled for mid-February, by the way). In the 2.11 series we’re going to take the time to stabilize these features, get rid of unused & deprecated code and focus on performance of the compiler and compiled code.
I remember that Scala 2.8 was not binary compatible with the 2.7 branch when it was released back in 2010. Has there been any compatibility differences between Scala 2.10 and 2.9? Will Scala 2.8 and 2.9 libraries be compatible with 2.10?Whenever possible, we offer source compatibility between major releases, but we do not promise binary compatibility between them. This would be too restrictive, as we need the flexibility to remove deprecated features or to change how we generate byte code for better performance. We want Scala to keep moving forward, which includes shedding the past where necessary.
Between minor releases, we’ve successfully ensured backwards binary compatibility during the 2.9 series, and are planning to also provide forward compatibility between 2.10.x minor releases.
As a historical note, the situation in 2.7 and 2.8 was actually worse than you suggest: even minor releases in the 2.7.x series were binary incompatible. We’ve invested in tooling (the Migration Manager) to ensure this doesn’t happen anymore as part of our continuous testing infrastructure.
Akka is another big part of the Typesafe stack. What were some of the highlights of the 2.1 release?[
Answer by Roland Kuhn, the Akka tech lead.] The biggest highlight is the clustering support, which allows you to connect multiple Akka nodes such that they monitor each other and keep track of each other’s state. This makes it possible to dynamically expand or contract the hardware resources for a cluster-aware application, e.g. deploying new actors onto added nodes to automatically grow the computing capacity of an actor pool. The cluster module is currently marked “experimental” to emphasize that while it has been tested thoroughly and works reliably, it has not yet been exposed to the general public long enough to confidently freeze the API. Instead we will allow it to be refined during the next development cycle based on our users’ feedback. We will keep those changes to a minimum and mark the module final in the 2.2 release. Please have a look at
the road map to discover in which direction we will take Akka throughout the next year.
Other highlights are (with the names of external contributors in parentheses):
- Integration with Scala standard library (SIP-14 Futures, dataflow as add-on module, akka-actor.jar will be part of the Scala distribution)
- Akka Camel support (Raymond Roestenburg & Piotr Gabryanczyk)
- Encrypted Akka Remoting using SSL/TLS (Peter Badenhorst)
- OSGi meta-information for most bundles (excluding samples and tests, Gert Vanthienen)
- An Actor DSL for more concise actor declarations, e.g. in the REPL
- A module for multi-node testing (to support you in developing clustered applications, experimental in the same sense as cluster support)
- A Java API for the TestKit
Yes, I like the comparison. When you drill down to the very core, Git and Scala are both pretty simple (as in having a few core features). A lot of powerful features are developed on top of that, and mastering them takes some time. So, in the beginning, users can stick to a small Java(/SVN)-like subset and be productive very fast, growing to full Scala mastery at their own pace. Typically, it doesn’t take long before they can’t imagine living without seamless branching & merging, and rebasing (whatever the Scala equivalent for those may be).
I read an interesting article called "Scala is like Git". Martin Odersky thought that comparison had some merit. What's your brief take on the comparison?
What are some early goals for the Scala community in 2013 and early roadmap ideas for Scala 2.11?
After 2.10 expanded Scala, 2.11 will contract (in space and time). Our goals are:
- A faster compiler -- scalac does much more work than javac, so we cannot hope to be as fast, but we are hard at work on shrinking both batch compilation times and giving our users a better incremental compilation experience in SBT, Maven (via Zinc), Eclipse, IntelliJ, and all other tools that leverage the incremental compiler
- Better performance of compiled code through a better optimizer, a faster standard library.
- We are investigating how to modularize the standard library,
- We will continue turning the Scala compiler into a platform
- Various efforts have implemented this vision in the past:
- SBT’s compiler interface
- Compiler plugins
- 2.10’s addition of reflection
- By moving currently integrated tools out of the compiler, leaving only an interface that can be used by others to implement similar tools (scaladoc, presentation compiler for IDE support, build-tool interface), we want to create a more open platform.
- Aggressively jettison unmaintained and unused features.
- Stabler: Macros and reflection were introduced as experimental features in 2.10. In 2.11 we’ll refine their APIs and stabilize their implementation.