In place of the traditionalThis week in Scala, I give youThis year in Scala. It is my take on what has happened in the Scala and the wider JVM world, and I will even throw in some of my “predictions” for 2014. (We’ll see next year how accurate I was.)
Overall, the Scala community and ecosystem has made great progress towards beingenterprise ready, whereenterprisemeans reliable, predictable and well-documented; not bloated and over-engineered. (Clojurists will claim otherwise, of course, butbah humbugto you!). Alongside the core language, we saw the rise of theReactive Manifesto, which gives name and common patterns you need to follow to build modern applications. The patterns are applicable to any platform, but seem to fit the current state of the JVM and Scala rather well. Finally, the selection of the Scala libraries, frameworks and projects continued to grow; see the Takipi blog to to find thetop 100 most popular ones.
The core is the Typesafe stack. It bundles together the Scala language, Akka and Play, allowing Typesafe to deliver a complete package for all your enterprise programming needs. (Terms, conditions, support contracts & other goodies applying, of course!)
2013 started on a high note following Scala 2.10.0 release, which brought very useful language features such as flexible string interpolation, value classes, futures and promises; all that on top of better bytecode emitter, more powerful matcher, Akka actors now part of the core distribution and much, much more. Check outhttp://www.scala-lang.org/download/changelog.htmlto see if you are truly making most of the 2.10 release.
During the rest of the 2013, we saw the 2.10.1, 2.10.2, and 2.10.3 releases, which brought numerous fixes and small features. Alongside the 2.10 branch, we had the chance to see the first milestones of 2.11. The whole Scala library is now split into components that you can pull in depending on what you need (parser-combinators, xml, …). Alongside these “user-level” changes, the compiler has seen big changes, too. To get a glimpse of what insides of 2.11 look like, check out the new macros and their expansion points. If you want to support the new macros in 2.10, be sure to check outmacro-paradise. In fact, be sure to head over tohttp://docs.scala-lang.org/scala/2.11/for the news on 2.11.
Akka, Play & Friends
Alongside the updates to the language, we have seen fantastic new features coming to Akka and Play and some of the related libraries. Just like the Scala language, we started off 2013 digesting the2.1.0 release of Akka. In addition to Akka actors folded into Scala library, 2.1.0 brought experimental cluster support, Camel support and secure remoting. For those unfortunate enough to be using the Java API, TestKit brought support for that, too! Then camethe 2.2.0 release, and it was good. The cluster support is no longer experimental, and we now have very powerful (and, of course, fully reactive) networking layer. That’s whatspray.iouses to provide concise and powerful HTTP server for your actors, and the HTTP clients to be used within your actors.
If you’re after pretty HTML rather than REST APIs (why, oh why?), you were no doubt following the Play world. In February, yougot your hands on Play 2.1.0; I will point out the really cool iteratee-based APIs, with some truly exciting andinteresting articlesto get your brains fired up. (Scalaz and Haskell, anyone?) Then camethe 2.2.0 release, which upgraded Sbt, improved the Java API (by splitting the results structure) and added built-in gzip support.
The community includes great minds behind the numerous libraries and frameworks–I cannot even begin to list names in fear of being unfair! Nevertheless, you can now get help at almost any level with your Scala problems; from the trivial to the very advanced.
In addition to the online forums,StackOverflow Scala“channel”, we have plenty of conferences to meet other Scala fans.Scala Dayswas an absolute blast in New York in May;Scala eXchangein London was an equal match (but without the transatlantic flight for many). Breaking the hegemony of the English language, there was the excellentScala.IOin Paris, too!
This is theCurrency(1000000) with USDquestion! What we can expect for sure is Scala 2.11, Akka integrating Spray, Play being based on Spray. It will be interesting to watch the race in the NIO space:NettyversusAkka (IO). Netty, even if you don’t use it directly, is behind many non-blocking database drivers. Which brings me nicely to Java 8. Java 8 will bring baby-versions of the grown-up things we already have in Scala. Nevertheless, the improvements to the bytecode and the JVM may well be significant help to the internals of Scala.
Breaking out of the JVM box, we will have to accept and embrace the polyglot nature of most of our applications. The JVM will no longer be enough for the most complex tasks. Anecdotally, atCake Solutions, we have already done a lot of C++/CUDA and Haskell code compiled to the machine code of the target platform. The computing power available to us is truly amazing. You must now learn to make most of the computing power available to you. Would your code keep a couple (a few hundred prehaps)cr1.8xlargeinstance (32 64bit cores, 288 GiB memory) busy?
All in all, 2014 will be another excellent year for functional programming; the knowledge you will learn in Scala will give you excellent starting point to start exploringHaskell,F#orOCaml. If you take the time to understand the principles of Akka, you will have a great starting point forErlang/OTP. (Either in the language of the devil itself–Erlang, or in the more humaneElixir.)
Embrace the Scala landscape on the JVM, explore Haskell and OCaml for strongly-typed functional native code, and Erlang/OTP for the concurrency. Keep learning and exploring and I canguaranteethat 2014 will be a blast!