Please sign in to comment.
Deprecates Par*View and Gen*View
In 2.12, this gives us the option to move the code from Gen*View down into *View. If we don't do something more drastic with views, which inertia and history suggests is a real possibility, we can at least shed a little of the implementation. These abstractions are *only* used to share implementation; there is no `view` method available on, for instance, `GenSeq` that lets one abstract over parallel/sequential collections while spawning views. scala> (List(1): collection.GenSeq[Int]).view <console>:8: error: value view is not a member of scala.collection.GenSeq[Int] (List(1): collection.GenSeq[Int]).view ^ Let's keep it that way. I suspect that views over parallel collections exist not because they were the most sought after feature, but rather because the initial incarnatin of parallel collections used to live undernead TraversableOnce, and hence were obligated to implement `def view`. This change will give us deprecation warnings in the non deprecated places that extend `Gen*View` (three, by my count) in the interim. There are ways to avoid this, but they aren't particularly appealing.
- Loading branch information...
Showing with 13 additions and 1 deletion.
- +1 −0 src/library/scala/collection/GenIterableView.scala
- +1 −0 src/library/scala/collection/GenIterableViewLike.scala
- +1 −0 src/library/scala/collection/GenSeqView.scala
- +1 −1 src/library/scala/collection/GenSeqViewLike.scala
- +1 −0 src/library/scala/collection/GenTraversableView.scala
- +1 −0 src/library/scala/collection/GenTraversableViewLike.scala
- +1 −0 src/library/scala/collection/parallel/ParIterableLike.scala
- +1 −0 src/library/scala/collection/parallel/ParIterableView.scala
- +1 −0 src/library/scala/collection/parallel/ParIterableViewLike.scala
- +1 −0 src/library/scala/collection/parallel/ParSeqLike.scala
- +2 −0 src/library/scala/collection/parallel/ParSeqView.scala
- +1 −0 src/library/scala/collection/parallel/ParSeqViewLike.scala