From 7a3468bec81c9382d37a10e6d2be5c928d4000db Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Sat, 26 Mar 2022 16:56:46 -0700 Subject: [PATCH 1/2] Give Nth advice --- _overviews/core/collections-migration-213.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_overviews/core/collections-migration-213.md b/_overviews/core/collections-migration-213.md index 68c5247774..114da1f632 100644 --- a/_overviews/core/collections-migration-213.md +++ b/_overviews/core/collections-migration-213.md @@ -15,6 +15,8 @@ The most important changes in the Scala 2.13 collections library are: - Transformation methods no longer have an implicit `CanBuildFrom` parameter. This makes the library easier to understand (in source code, Scaladoc, and IDE code completion). It also makes compiling user code more efficient. - The type hierarchy is simplified. `Traversable` no longer exists, only `Iterable`. - The `to[Collection]` method was replaced by the `to(Collection)` method. + - The `toC` methods are strict by convention and yield the default collection type where applicable. For example, `Iterator.continually(42).take(10).toSeq` produces a `List[Int]` and without the limit would not. + - `toIterable` is deprecated wherever defined. For `Iterator`, in particular, prefer `to[LazyList]`. - Views have been vastly simplified and work reliably now. They no longer extend their corresponding collection type, for example, an `IndexedSeqView` no longer extends `IndexedSeq`. - `collection.breakOut` no longer exists, use `.view` and `.to(Collection)` instead. - Immutable hash sets and hash maps have a new implementation (`ChampHashSet` and `ChampHashMap`, based on the ["CHAMP" encoding](https://michael.steindorfer.name/publications/oopsla15.pdf)). From 4895a4b7cc34c786937d1ef5c198bce66ab8777c Mon Sep 17 00:00:00 2001 From: som-snytt Date: Tue, 29 Mar 2022 09:49:23 -0700 Subject: [PATCH 2/2] Fix brackets Co-authored-by: Julien Richard-Foy --- _overviews/core/collections-migration-213.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/core/collections-migration-213.md b/_overviews/core/collections-migration-213.md index 114da1f632..5eb05536ee 100644 --- a/_overviews/core/collections-migration-213.md +++ b/_overviews/core/collections-migration-213.md @@ -16,7 +16,7 @@ The most important changes in the Scala 2.13 collections library are: - The type hierarchy is simplified. `Traversable` no longer exists, only `Iterable`. - The `to[Collection]` method was replaced by the `to(Collection)` method. - The `toC` methods are strict by convention and yield the default collection type where applicable. For example, `Iterator.continually(42).take(10).toSeq` produces a `List[Int]` and without the limit would not. - - `toIterable` is deprecated wherever defined. For `Iterator`, in particular, prefer `to[LazyList]`. + - `toIterable` is deprecated wherever defined. For `Iterator`, in particular, prefer `to(LazyList)`. - Views have been vastly simplified and work reliably now. They no longer extend their corresponding collection type, for example, an `IndexedSeqView` no longer extends `IndexedSeq`. - `collection.breakOut` no longer exists, use `.view` and `.to(Collection)` instead. - Immutable hash sets and hash maps have a new implementation (`ChampHashSet` and `ChampHashMap`, based on the ["CHAMP" encoding](https://michael.steindorfer.name/publications/oopsla15.pdf)).