category | title |
---|---|
release |
Scala 2.10.2 is now available! |
We are very happy to announce the final release of Scala 2.10.2!
The Scala team and contributors fixed 95 issues since 2.10.1!
In total, 164 RC1 pull requests and 7 RC2 pull requests were opened on GitHub, of which 140 were merged after having been tested and reviewed.
Before reporting a bug, please have a look at these known issues.
The Scala IDE with Scala 2.10.2 built right in is available through one of the following update-sites:
- for Eclipse 3.7 (Indigo)
- for Eclipse 3.8/4.2 (Juno) (Support for this version is experimental.)
Have a look at the getting started guide for more info.
Since 2.10.2 is strictly a bug-fix release, here's an overview of the most prominent new features and improvements as introduced in 2.10.0:
- Value Classes
- A class may now extend
AnyVal
to make it behave like a struct type (restrictions apply). - https://docs.scala-lang.org/overviews/core/value-classes.html
- A class may now extend
- Implicit Classes
- The implicit modifier now also applies to class definitions to reduce the boilerplate of implicit wrappers.
- https://docs.scala-lang.org/sips/implicit-classes.html
- String Interpolation
val what = "awesome"; println(s"string interpolation is ${what.toUpperCase}!")
- https://docs.scala-lang.org/overviews/core/string-interpolation.html
- Futures and Promises
- Asynchronously get some JSON:
for (req <- WS.url(restApiUrl).get()) yield (req.json \ "users").as[List[User]]
(uses play!) - https://docs.scala-lang.org/overviews/core/futures.html
- Asynchronously get some JSON:
- Dynamic and applyDynamic
x.foo
becomesx.applyDynamic("foo")
ifx
's type does not define afoo
, but is a subtype ofDynamic
- https://docs.scala-lang.org/sips/type-dynamic.html
- Dependent method types:
def identity(x: AnyRef): x.type = x
// the return type says we return exactly what we got
- New ByteCode emitter based on ASM
- Can target JDK 1.5, 1.6 and 1.7
- Emits 1.6 bytecode by default
- Old 1.5 backend is deprecated
- A new Pattern Matcher
- rewritten from scratch to generate more robust code (no more exponential blow-up!)
- code generation and analyses are now independent (the latter can be turned off with
-Xno-patmat-analysis
)
- Scaladoc Improvements
- Implicits (-implicits flag)
- Diagrams (-diagrams flag, requires graphviz)
- Groups (-groups)
- Modularized Language features
- Get on top of the advanced Scala features used in your codebase by explicitly importing them.
- https://docs.scala-lang.org/sips/modularizing-language-features.html
- Parallel Collections are now configurable with custom thread pools
- Akka Actors now part of the distribution
- scala.actors have been deprecated and the akka implementation is now included in the distribution.
- Performance Improvements
- Faster inliner
Range#sum
is now O(1)- Update of ForkJoin library
- Fixes in immutable
TreeSet
/TreeMap
- Improvements to PartialFunctions
- Addition of
???
andNotImplementedError
- Addition of
IsTraversableOnce
+IsTraversableLike
type classes for extension methods - Deprecations and cleanup
- Floating point and octal literal syntax deprecation
- Removed scala.dbc
- Scala Reflection
- Macros
The API is subject to (possibly major) changes in the 2.11.x series, but don't let that stop you from experimenting with them! A lot of developers have already come up with very cool applications for them. Some examples can be seen at hxxp://scalamacros.org/news/2012/11/05/status-update.html.
# | Author |
---|---|
50 | Jason Zaugg |
45 | Adriaan Moors |
45 | Eugene Burmako |
16 | Paul Phillips |
12 | Eugene Vigdorchik |
6 | Kato Kazuyoshi |
4 | Heather Miller |
3 | Paolo Giarrusso |
2 | James Iry |
2 | Uladzimir Abramchuk |
2 | Grzegorz Kossakowski |
2 | Vinicius Miana |
2 | Simon Ochsenreither |
1 | Som Snytt |
1 | Szabolcs Berecz |
1 | Eugene Platonov |
1 | Lukas Rytz |
1 | Bjorn Regnell |
1 | Iulian Dragos |
1 | François Garillot |
1 | Martin McNulty |
1 | Gyuhang Shim |
1 | Igor Moreno |
1 | Viktor Klang |
1 | Hubert Plociniczak |
1 | Philipp Haller |
1 | Nada Amin |
1 | Dan Rosen |