Scala 2.11.0-RC1 is now available
scala-lang.org
Scala 2.11.0-RC1 is now available
1–10 of 33 posts
Re: Scala 2.11.0-RC1 is now available
#2Re: Scala 2.11.0-RC1 is now available
#3Re: Scala 2.11.0-RC1 is now available
#4New 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
Re: Scala 2.11.0-RC1 is now available
#5I'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.
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.
Re: Scala 2.11.0-RC1 is now available
#6I'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.
Compilation speed is also drastically improved by using the type system. If you give your code well defined internal interfaces, there will be very little recompilation needed by SBT's incremental compiler. Your code will be cleaner too.
http://www.chrisstucchio.com/blog/2014/bondage_and_disciplin...
Re: Scala 2.11.0-RC1 is now available
#7I'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.
> 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 feature…
> Any languages gets easy to read & write once you master it
Perl :(
Re: Scala 2.11.0-RC1 is now available
#8What are the distinguished features from the latest one ?
Re: Scala 2.11.0-RC1 is now available
#9I'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.
> 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 feature…
I've been coding mostly in Scala for a couple of years now and am still learning new things. The more I learn the more I realise how powerful the features are.
Re: Scala 2.11.0-RC1 is now available
#10I'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.
> 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 feature…
Scala is the language that helps you write better code. In the kinds of projects that I've been working for the last 3 years, requiring parallelism, efficient usage of resources, asynchronicity, redundancy, scalability, throughput, reliability on the whole, I can honestly say that none of the other languages could do a better job.
On features, it actually doesn't have many, but the features that it does have are powerful enough that you can have bigger abstractions. For example, "async" is not a language feature such as in C#, but a library. Of course, there's much to learn, especially concepts that have been borrowed from Haskell or other FP languages with a Scala-ish twist, like persistent data-structures, type-classes, futures/promises, iteratees and in general, what's the deal with monads, monoids and applicative functors. In training beginners explaining these concepts was the most difficult part of the training, trumping all others considerations, starting from the basics like "don't use vars".
Scala is difficult because it's a functional programming language, beautifully blended with OOP, being in fact a better OOP language than most mainstream OOP languages. Learning FP and then learning OOP in a way not exposed by languages like Java and then learning what good design looks like, grokking a lot of FP design patterns in the process, that can be very overwhelming. For any developer that is not familiar with a good FP language already, or that thinks OOP is what Java gives you, the transition can be pretty painful. On the other hand - I'm of the opinion that if learning a new language is not painful, then it doesn't give you anything of value, so learning it is pretty useless.