2.2 Spotlight: Immutable Everywhere

Akka has in 2.2 been refactored to require scala.collection.immutable data structures as much as possible, this leads to fewer bugs and more opportunity for sharing data safely.

Do you know that some of the collection types in Scala Predef are mutable? For example, a method defined with parameter of type Seq[String], without any import, can be used with both an immutable List and a mutable ListBuffer or an array. Such method signatures have been changed to scala.collection.immutable.Seq.

See the Migration Guide for more information.

Recent comments

Blog comments powered by Disqus