Scala Spores, safe mobile closures: SIP-21.
Spores is an extension of the Scala compiler that enables a safer use of closures in concurrent and distributed environments. It allows developers to guarantee properties of functions based on types, having more control over the function's environment.
Spores comes with a transitive checker to ensure that captured types can be serialized by the JVM (Java serialization). For more information, check the motivation and the getting-started guide.
Add to your project
libraryDependencies += "ch.epfl.scala" %% "spores" % "0.4.3" addCompilerPlugin("ch.epfl.scala" %% "spores-serialization" % "0.4.3")