

Scala 2.11.0-RC1 is now available - wpietri
http://www.scala-lang.org/news/2014/03/06/release-notes-2.11.0-RC1.html

======
thescrewdriver
From the article:

New features in the 2.11 series

This release contains all of the bug fixes and improvements made in the 2.10
series, as well as:

Collections

Immutable HashMaps and HashSets perform faster filters, unions, and the like,
with improved structural sharing (lower memory usage or churn).

Mutable LongMap and AnyRefMap have been added to provide improved performance
when keys are Long or AnyRef (performance enhancement of up to 4x or 2x
respectively). BigDecimal is more explicit about rounding and numeric
representations, and better handles very large values without exhausting
memory (by avoiding unnecessary conversions to BigInt).

List has improved performance on map, flatMap, and collect.

See also Deprecation above: we have slated many classes and methods to become
final, to clarify which classes are not meant to be subclassed and to
facilitate future maintenance and performance improvements.

Modularization

The core Scala standard library jar has shed 20% of its bytecode. The modules
for xml, parsing, swing as well as the (unsupported) continuations plugin and
library are available individually or via scala-library-all. Note that this
artifact has weaker binary compatibility guarantees than scala-library – as
explained above.

The compiler has been modularized internally, to separate the presentation
compiler, scaladoc and the REPL. We hope this will make it easier to
contribute. In this release, all of these modules are still packaged in scala-
compiler.jar. We plan to ship them in separate JARs in 2.12.x.

Reflection, macros and quasiquotes

Please see this detailed changelog that lists all significant changes and
provides advice on forward and backward compatibility.

See also this summary of the experimental side of the 2.11 development cycle.
#3321 introduced Sprinter, a new AST pretty-printing library! Very useful for
tools that deal with source code.

Back-end

The GenBCode back-end (experimental in 2.11). See @magarciaepfl’s extensive
documentation.

A new experimental way of compiling closures, implemented by @JamesIry. With
-Ydelambdafy:method anonymous functions are compiled faster, with a smaller
bytecode footprint. This works by keeping the function body as a private
(static, if no this reference is needed) method of the enclosing class, and at
the last moment during compilation emitting a small anonymous class that
extends FunctionN and delegates to it. This sets the scene for a smooth
migration to Java 8-style lambdas (not yet implemented).

Branch elimination through constant analysis #2214

Compiler Performance

Incremental compilation has been improved significantly. To try it out,
upgrade to sbt 0.13.2-M2 and add incOptions :=
incOptions.value.withNameHashing(true) to your build! Other build tools are
also supported. More info at this sbt issue – that’s where most of the work
happened. More features are planned, e.g. class-based tracking.

We’ve been optimizing the batch compiler’s performance as well, and will
continue to work on this during the 2.11.x cycle.

Improve performance of reflection SI-6638

IDE * Numerous bug fixes and improvements!

REPL

The bytecode decompiler command, :javap, now works with Java 7 SI-4936 and has
sprouted new options SI-6894 (Thanks, @som-snytt!)

Added command :kind to help to tell ground types from type constructors. #2340
(Thanks, George Leontiev and Eugene Yokota!)

The interpreter can now be embedded as a JSR-166 Scripting Engine SI-874.
(Thanks, Raphael Jolly!)

Warnings * Warn about unused private / local terms and types, and unused
imports, under -Xlint. This will even tell you when a local var could be a
val.

Slimming down the compiler

The experimental .NET backend has been removed from the compiler.

Scala 2.10 shipped with new implementations of the Pattern Matcher and the
Bytecode Emitter. We have removed the old implementations.

Search and destroy mission for ~5000 chunks of dead code. #1648

------
Cless
I've not used Scala since ~March 2013. I sure hope compilation times have
improved since then. That was one of the main reasons I stopped using Scala.
Scala is one of the easiest languages to read and write once you master it,
but the compilation times were frustrating. Excited to try out 2.11 later
tonight.

~~~
krat0sprakhar
> Scala is one of the easiest languages to read and write once you master it

I beg to differ with this. Any languages gets easy to read & write once you
master it. After having finished the Scala course and spending considerable
time trying to get grips with the language, I was still totally clueless about
a majority of the features.

Although I really liked how powerful Scala it is even if you grok 30% of its
features but the learning curve required to master it is extremely steep. Prof
Odersky has been quite vocal about the feature bloat and lets hope the future
releases are more conservative in that sense.

~~~
laureny
> Prof Odersky has been quite vocal about the feature bloat and lets hope the
> future releases are more conservative in that sense.

Languages never get simpler as they age, and Scala is certainly proof of that
rule.

If anything, advanced features that make up for good academic papers have
priority over fixing bugs and streamlining the libraries.

Paul Phillips, a Typesafe cofounder, recently left the company and went on a
tour explaining why he thought Scala was headed in the wrong direction:

[http://www.youtube.com/watch?v=4jh94gowim0](http://www.youtube.com/watch?v=4jh94gowim0)

~~~
bad_user
For real?

Paul Philips is an awesome developer, contributed a lot to Scala and he did
quit because he thought that Scala was headed in the wrong direction. These
are the facts. On the other hand the kind of problems he described are
problems that happen in _every_ mainstream language, either due to the
pressure of keeping it stable and of backwards compatibility (you know, real
world concerns) or because current languages aren't equipped to handle it or
because of pragmatic reasons with which he doesn't agree with. And in fact,
speaking of " _academic papers_ ", some of the problems he cares about can
only be fixed for real in languages with dependent types (ever heard of one?).

As for "fixing bugs and streamlining the libraries", if you bothered reading
the release notes on Scala 2.11-RC1 before commenting, you would know that
this release is exactly about fixing bugs, modularizing the compiler, improved
compilation times, streamlining the libraries, eliminating deprecated stuff
and so on. By all accounts, it will be an awesome release even though it
doesn't add features to the language. It won't solve all of Paul's concerns of
course, but there are people that actually care and work on these problems.

But then, whenever that happens, people start complaining that Scala breaks
backwards compatibility too often. Apparently you can't please everybody. And
btw, the Scala core devs also have plans for breaking source compatibility by
implementing a Go-like source-code migrator to get rid of deprecated syntax
sometimes in the future.

Most importantly - at the end of that talk, Paul Philips still claims that
Scala is his favorite language. But then again, you weren't really interested
in what he actually had to say, did you?

~~~
cbeustwatch
You should not respond to lauren Y. This is a sock puppet account used by
Cedric Beust.

[https://news.ycombinator.com/item?id=7358238](https://news.ycombinator.com/item?id=7358238)

~~~
joostdevries
I was wondering about the persistent negativity about Scala since it runs
counter to my own very positive experiences with Scala and Play. For me it
hits just the sweet spot between monadic goodness and getting stuff done in
the JVM eco system.

For Scala 2.11 I'm excited about the focus on performance of map and flatmap
in List. Those are my bread and butter at the moment. It's amazing how
intuïtive that becomes once you use it everyday for dealing with futures,
collections etc and you forget about the mathematical monad etc underpinnings
for a moment.

I hope that splitting xml parsing off into a module will reinvigorate xml
support that's highly performant and easy to use. Of course json is all the
hotness. But there's a lot of xml services out there to be used. So that's a
core tool for a lot of applications.

I can't wait to try out the compiler/sbt speed improvements in sbt 13.2. I
seem to recall that there are talks on unifying the compilation of sbt and the
IDE. That's something I look forward to since I tend to use the ~ continuous
run/test/compile options of sbt and then having another compilation going on
at the same time within my IDE seems wasteful.

I do hope that the Eclipse Scala IDE gets enough love and will continue to
improve. A lot of companies in the Java space got used to free IDEs. (I know
that's penny wise) So having a good free IDE is a strong enabler for grass
roots Scala adoption.

Together with the super support for JS MVC applications that's coming up in
Play 2.3 I'm looking forward to putting this to use.

~~~
frowaway001
> I was wondering about the persistent negativity about Scala since it runs
> counter to my own very positive experiences with Scala and Play.

Yeah, it's mostly the same people with multiple accounts.

------
rocky5
What are the distinguished features from the latest one ?

~~~
thescrewdriver
Among other things faster collections, faster compiler, less old cruft. More
Java 8 interop too.

------
zomlard
"SI-7296 Case classes with > 22 parameters are now allowed." YES!

~~~
thescrewdriver
Useful for SLICK, but I think SLICK 2.0 already has a work-around for that.

