In association with heise online

07 January 2013, 11:24

Scala 2.10.0 adds implicit value to the language

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Scala logo The developers of Scala have released version 2.10.0 of the language, adding many new features to the JVM-based alternative to Java and updating May 2011's release of Scala 2.9. Among the new features are value classes which avoid allocating runtime objects for wrappers and implicit classes that reduce boilerplate code when writing classes to provide extension methods to other types. Another addition is support for futures and promises for asynchronous code development, allowing the use of placeholders for results which are "coming in the future".

String interpolation, to simplify the composition of complex strings, has also been added and is activated on a string by preceding it with the letter s. For example, s"Hello $name" would insert the value of the name variable while s"1+2 is ${1+2}" would evaluate the contents of the curly brackets and insert "3" into the string.

Other changes include a new byte code emitter which can target JDK 1.5, 1.6 and 1.7 and emits 1.6 byte code by default. The older 1.5 backend has now been deprecated. A new pattern matcher, rewritten from scratch to generate more robust code and separate code generation from analysis, has also been included. The parallel collections of Scala 2.9 have been enhanced with custom thread pools and Akka actors have been incorporated into the language migrating users away from Scala's actors. Experimental features have also been added to Scala 2.10.0, specifically Reflection and Macros.

A more complete list of changes is included in the release announcement, which also includes details of 43 community projects that have made updated releases to coincide with Scala 2.10.0's availability, along with a full list of all commits and fixes issues since Scala 2.9.2. Outstanding known issues are also listed and are scheduled to be fixed in 2.10.1; a release candidate of that should be available in mid-February. Scala 2.10.0 is available to download for Unix, Mac OS X and Cygwin, and Windows, or as source from the Scala download page. It is licensed under a 3 clause BSD licence.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1778295
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit