-
Notifications
You must be signed in to change notification settings - Fork 82
2.12.0 final release notes #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
32cf8c8
to
b595ad6
Compare
|
||
Lukas has delivered a powerful new optimizer with this release, built on earlier work by Miguel Garcia. Many more (effectively) final methods, including those defined in objects and traits, are now inlined. As well, closure allocations, dead code and [box/unbox pairs](https://github.com/scala/scala/pull/4858) are eliminated more effectively. | ||
- A trait is compiled to an interface with default methods for improved binary compatibility. | ||
- Lambda syntax can now be used to create instances of types with a single abstract method (SAM types). Scala code can seamlessly use libraries with higher-order functions written in Java 8, and vice versa. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scala code can seamlessly use libraries with higher-order functions written in Java 8
Is this really true? I need to supply type arguments manually if I want to use any higher-order method of the Java Stream API (or did I make a mistake?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example in https://adriaanm.github.io/reveal.js/scala-2.12.html#/3/6 (it scrolls)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhhh, I guess it only doesn't work when the functions are defined as vals instead of defined inline.
Scala 2.12 is all about making optimal use of Java 8's new features. Traits ([#5003](https://github.com/scala/scala/pull/5003)) and functions are compiled to their Java 8 equivalents, and we treat Single Abstract Method types and Scala's builtin function types uniformly from type checking to the back end ([#4971](https://github.com/scala/scala/pull/4971)). We also use `invokedynamic` for a more natural encoding of other language features ([#4896](https://github.com/scala/scala/pull/4896)). We've standardized on the GenBCode back end ([#4814](https://github.com/scala/scala/pull/4814), [#4838](https://github.com/scala/scala/pull/4838)) and the flat classpath implementation is now the default ([#5057](https://github.com/scala/scala/pull/5057)). The optimizer has been completely overhauled for 2.12. | ||
## Binary compatibility | ||
|
||
Since Scala 2.10, minor releases of Scala are binary compatible with each other. We maintain [this policy](/documentation/compatibility.html) for 2.12.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is broken (it should not be a relative link), and I cannot find the page it should go to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that document exists on scala-lang.org, but there is probably some old issue about it that I fixed.
@adriaanm I think it's mostly confusing to talk about SAMs and IndyLambda in the same paragraphs, and going back and forth between the two topics. They are not technically related, and I think users will get a better understanding of the two concepts if we talk about them separately. I'll do some changes in that direction. As always, feel free to rework things. |
OK, I'm done now :) We need to make sure scala/docs.scala-lang#613 is merged first, otherwise we have an invalid link. |
Since Scala 2.10, minor releases of Scala are binary compatible with each other. We maintain [this policy](/documentation/compatibility.html) for 2.12.x. | ||
|
||
TODO: fix the link above | ||
Since Scala 2.10, minor releases of Scala are binary compatible with each other. We maintain [this policy](http://docs.scala-lang.org/overviews/core/binary-compatibility.html) for 2.12.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the link /overviews/core/binary-compatibility-of-scala-releases.html
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i changed the filename and forgot to update here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i push a fix now
continues from #204, see also #202