Introducing Akka Cloud to Edge Continuum. Build once for the Cloud. Seamlessly deploy to the Edge - Read Blog
Support

Interview with Scala creator Martin Odersky — The current state of Scala

[Note: this article by Hartmut Schlosser originally appeared on JAXenter.com]

James Strachan, the creator of Groovy, once said that if somebody had shown him Martin Odersky’s Programming in Scala book back in 2003, he would have probably never created Groovy. Scala’s star is still shining bright — we invited Martin Odersky, the creator of Scala, to talk about the impending 2.12 version, the current state of this programming language and the technical innovations that await us.

Martin Odersky designed Scala in 2001. Now version 2.12 is in development and version 3.0 is just around the corner. Even James Gosling, the creator of Java once said that if he were to choose “a language to use today other than Java, it would be Scala.” We talked to the creator of Scala about the current state of this programming language, what to expect from version 2.12 and more.


JAXenter: It’s been 15 years since the work on Scala began at the École Polytechnique Fédérale de Lausanne (EPFL). If we look back at how Scala looked like more than a decade ago, one cannot help but wonder: What is the difference between the original concept and design of Scala and the current state of this programming language?

Martin Odersky: Scala was designed to show that a fusion of functional and object-oriented programming is possible and practical. That’s still its primary role. What has changed is that at the time it came out FP was regarded as an academic niche. So it was difficult to make the case that FP should be needed in a mainstream language. XML literals were added to the language as a specific use case because we knew that traditional OO techniques had a hard time dealing with XML trees. Nowadays the tide has turned. Functional programming has become respectable, in some areas even mainstream, and it’s sometimes harder to make the case for good object-oriented design.

In terms of language features, I believe the biggest development has been the refinements we did to implicit parameter search. Implicits evolved from a somewhat ad-hoc feature into the cornerstone of most Scala libraries. I believe they will become even more important in the future.

JAXenter: In your opinion, what are the most important technical milestones for this programming language?

Martin Odersky: The most important step was no doubt Scala 2.8, which came out in 2010. With 2.8 we had for the first time a uniform collections library, refined rules for implicit resolution, and type inference. After that, Scala 2.10 was also a big step because it introduced meta-programming in Scala.

Scala was designed to show that a fusion of functional and object-oriented programming is possible and practical.

JAXenter: Were there also milestones in relation to the dissemination of the language? The community around Scala has formed rather fast and important projects and companies adopted it quickly. What contributed to the expansion of this language?

Martin Odersky: Adoption has by and large steadily increased for the last eight years, but there were nevertheless a few drivers which led to a rapid adoption in certain areas. The first leap was the adoption of Scala by Twitter and other new web companies, starting in 2008. The second leap was widespread adoption of reactive programming, notably around Akka and Play, starting around 2011. The third leap was the success of Scala in big and fast data scenarios as well as data science, driven by Spark, Kafka, and many other frameworks.

JAXenter: An entire stack was formed around Scala; it consists of Akka, Play, Lagom, Apache Spark and others. What role does this stack —and the so-called reactive programming paradigm— play in the Scala community and especially in Lightbend?

Martin Odersky: Developing and supporting this technology stack is at the core of what Lightbend does. The stack covers everything from web frameworks to big data backends, with special emphasis on reactive programming and microservices in distributed scenarios. That’s where these technologies are very successful. A large part of the Scala community uses this stack, but there are of course also many other frameworks to choose from.

The most important step was no doubt Scala 2.8.

JAXenter: Right now Scala 2.12 is in development. What is this release all about?

Martin Odersky: The main purpose of 2.12 is to optimize Scala for use on Java 8. Java 8 introduced lambdas and default methods for interfaces. Both are very useful to streamline Scala code generation and make the code size smaller.

JAXenter: The next major version of Scala —3.0— is fast approaching. Can you offer us some insight into the technical innovations that await us?

Martin Odersky: It’s too early to talk about that yet. The next major version will be Scala 2.13, which will concentrate on modernizing and modularizing some of the core libraries.

JAXenter: Will Scala 3.0 differ greatly from the 2.x line of development, as it is often the case with major versions or will it be a natural evolution of 2.x?

Martin Odersky: Scala has been quite stable over the last five years. We hope that by the time Scala 3.0 comes out we will have the necessary technologies in place to make some bigger changes without too much disruption. For one, we are working on sophisticated rewrite tools that allow code to evolve to new standards. We are also planning to use TASTY, a platform independent interchange format, to avoid binary compatibility problems through automatic code adaption to specific platforms and versions.

The main purpose of 2.12 is to optimize Scala for use on Java 8.

JAXenter: Is there already a release roadmap for Scala 3.0?

Martin Odersky: No, not yet. We want to keep some flexibility in deciding what to ship before we determine when to ship it.

JAXenter: Scala was explicitly designed as a language which should be adopted in research, but should also have an industrial use. Is the gap between industry and research really that big? There has been criticism with regard to the fact that a developer/architect’s job has little to do with what is taught in universities.

Martin Odersky: I can’t speak for other universities. But I find that our students at EPFL have no problems finding interesting work in which they can apply what they have learned during their studies. Scala certainly helps since it has a healthy job market.

JAXenter: What area of research is still insufficiently taken into consideration in today’s mainstream languages?

Martin Odersky: Functional programming is just catching up in industry. I think one of the next big developments will be the refinement of type systems to describe ever more precise properties of programs. This has been researched for a while, and more progress is needed to make this really practical. But I predict that this development end will pick up speed in the future.

 

Read More