Created by admin on 2009-04-23. Updated: 2009-08-12, 21:16

After 2.7.4, the next major release of Scala will be 2.8. This version will make a rather bigger jump ahead than previous releases. It will fix many outstanding tickets, and include several changes and additions. Read below for more!

Features Included in Scala 2.8

At least the following new features will be included:

Redesigned collection libraries. Scala's collection class hierarchy has been redesigned to be more regular, expressive, and performant. A snapshot of the new design is contained in the 2.8.0x branch of Scala's subversion repository. A white paper explaining the new design is forthcoming. The redesign is done so that most user code should be unaffected. However, implementations of collections such as sequences, sets or maps will need to be re-adapted to the new framework to use its full functionality.



Named and default arguments. Method arguments can be passed by names, and method parameters can have default values.



Package objects. Packages can now be defined not just by files in some directory, but in addition by a special object that lists additional members of the package. For instance, you could add a number of type aliases, which would then be visible as members of the package. This functionality is used in the new collection libraries to ensure backwards compatibility. For instance class List in the new library will live in package scala.collection.immutable. But code that accesses it as a scala.List will still work, because there is a package object definition like this: package object scala type List[+A] = scala.collection.immutable.List[A] val List = scala.collection.immutable.List ... }

Beefed up Scala Swing libraries. There will be new functionality and better documentation in the scala.swing package.



Support for continuations. A compiler plugin will support continuations as an optional feature of Scala, using a type-directed continuation passing transform. Continuations are useful to implement advanced control constructs, for instance for asynchronous I/O, user interface event handling, or dataflow concurrency.



Type specialization. A new @specialize annotation on a type parameter will produce specialized versions of the generic code for primitive types. This makes it possible to avoid costly boxing and unboxing operations for higher-order functions or generic data structures such as arrays. It can lead to important speedups.



Revamped REPL. Scala's interpreter loop will have a lot of new functionality. In particular command completion will work.



Packrat parser combinators Scala's combinator parser library will be upgraded to "packrat parsing". This helps efficiency and also permits more grammar styles to be expressed as parsers. For instance, left-recursive productions can now be handled.

The 2.8 version will also drop most operations that were deprecated in earlier versions, and will no longer support the old version 1.4 of the Java Virtual Machine. The class file format and compilation internals will be changed to some degree, so that programs compiled under 2.8 will not be compatible with binaries compiled earlier. Source compatibility should be by and large assured, however.

Finally, concerning the timeframe, we want to have the first beta out at the beginning of June. So that's just 6 more weeks!