Skip to content

Commit 5bc7390

Browse files
committed
introduce a list of 'other changes'
1 parent 2046082 commit 5bc7390

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

hand-written.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,6 @@ Also, hat tip to Daniel Spiewak for [a great explanation of this feature](https:
144144

145145
For now, we recommend using `-Ypartial-unification` over `-Xexperimental`, as the latter enables some surprising features that will not ship with a future release of Scala.
146146

147-
#### Parameter names available at runtime
148-
149-
With [JEP-118](http://openjdk.java.net/jeps/118), parameter names can be stored in class files and be queried at runtime using Java reflection. A quick REPL session shows this in action:
150-
151-
scala> case class Person(name: String, age: Int)
152-
defined class Person
153-
154-
scala> val paramNames = classOf[Person].getConstructors.head.getParameters.toList
155-
paramNames: List[java.lang.reflect.Parameter] = List(final java.lang.String name, final int age)
156-
157147
#### New representation and locking scope for local lazy vals
158148

159149
Local lazy vals and objects, i.e., those defined in methods, now use a more efficient representation (implemented in [#5294](https://github.com/scala/scala/pull/5294) and [#5374](https://github.com/scala/scala/pull/5374)).
@@ -266,14 +256,27 @@ Thanks, [Simon Ochsenreither](https://github.com/soc), for this contribution.
266256

267257
A number of improvements to `scala.concurrent.Future` were made for Scala 2.12. This [blog post series](https://github.com/viktorklang/blog) by Viktor Klang explores them in detail.
268258

269-
#### Use standard Java 8 APIs
270-
The Scala library is [free](https://github.com/scala/scala/pull/4443) of [references](https://github.com/scala/scala/pull/4712) to `sun.misc.Unsafe`, and [no longer ships](https://github.com/scala/scala/pull/4629) with a fork of the forkjoin library.
271-
272259

273260
#### scala-java8-compat
274261

275262
The [Java 8 compatibility module for Scala](https://github.com/scala/scala-java8-compat) has received an overhaul for Scala 2.12. Even though interoperability of Java 8 SAMs and Scala functions is now baked into the language, this module provides additional convenience for working with Java 8 SAMs. Java 8 streams support was also added during the development cycle of Scala 2.12. Releases are available for both Scala 2.11 and Scala 2.12.
276263

264+
265+
266+
### Other changes and deprecations
267+
268+
- A [mutable TreeMap](http://www.scala-lang.org/files/archive/api/2.12.0/scala/collection/mutable/TreeMap.html) implementation was added ([#4504](https://github.com/scala/scala/pull/4504)).
269+
- [ListSet](http://www.scala-lang.org/files/archive/api/2.12.0/scala/collection/immutable/ListSet.html) and [ListMap](http://www.scala-lang.org/files/archive/api/2.12.0/scala/collection/immutable/ListMap.html) now ensure insertion-order traversal (in 2.11.x, traversal was in reverse order), and their performance has been improved ([#5103](https://github.com/scala/scala/pull/5103)).
270+
- The [`@deprecatedInheritance`](http://www.scala-lang.org/files/archive/api/2.12.0/scala/deprecatedInheritance.html) and [`@deprecatedOverriding`](http://www.scala-lang.org/files/archive/api/2.12.0/scala/deprecatedOverriding.html) are now public and available to library authors.
271+
- The `@hideImplicitConversion` Scaladoc annotation allows customizing which implicit conversions are hidden ([#4952](https://github.com/scala/scala/pull/4952)).
272+
- The `@shortDescription` Scaladoc annotation customizes the method summary on entity pages ([#4991](https://github.com/scala/scala/pull/4991)).
273+
- JavaConversions, providing implicit conversions between Scala and Java collection types, has been deprecated. We recommend using [JavaConverters](http://www.scala-lang.org/files/archive/api/2.12.0/scala/collection/JavaConverters$.html) and explicit `.asJava` / `.asScala` conversions.
274+
- Eta-expansion (conversion of a method to a function value) of zero-args methods has been deprecated, as this can lead to surprising behavior ([#5327](https://github.com/scala/scala/pull/5327)).
275+
- The Scala library is [free](https://github.com/scala/scala/pull/4443) of [references](https://github.com/scala/scala/pull/4712) to `sun.misc.Unsafe`, and [no longer ships](https://github.com/scala/scala/pull/4629) with a fork of the forkjoin library.
276+
- Exhaustiveness analysis in the pattern matcher has been improved ([#4919](https://github.com/scala/scala/pull/4919)).
277+
- We emit parameter names according to [JEP-118](http://openjdk.java.net/jeps/118), which makes them available to Java tools and exposes them through Java reflection.
278+
279+
277280
## Breaking changes
278281

279282
### Object initialization locks and lambdas
@@ -386,6 +389,7 @@ PR [#4794](https://github.com/scala/scala/pull/4749) changed the syntax trees fo
386389

387390

388391

392+
389393
## Improving these notes
390394

391395
Improvements to these release notes [are welcome!](https://github.com/scala/make-release-notes/blob/2.12.x/hand-written.md)

0 commit comments

Comments
 (0)