@@ -12,22 +12,15 @@ num: 1
1212permalink : /overviews/collections-2.13/:title.html
1313---
1414
15- ** Martin Odersky, and Lex Spoon**
16-
17- In the eyes of many, the new collections framework is the most significant
18- change in the Scala 2.8 release. Scala had collections before (and in fact the new
19- framework is largely compatible with them). But it's only 2.8 that
20- provides a common, uniform, and all-encompassing framework for
21- collection types.
22-
23- Even though the additions to collections are subtle at first glance,
24- the changes they can provoke in your programming style can be
25- profound. In fact, quite often it's as if you work on a higher-level
26- with the basic building blocks of a program being whole collections
27- instead of their elements. This new style of programming requires some
28- adaptation. Fortunately, the adaptation is helped by several nice
29- properties of the new Scala collections. They are easy to use,
30- concise, safe, fast, universal.
15+ The collections framework is the heart of the Scala 2.13 standard
16+ library. It provides a common, uniform, and all-encompassing
17+ framework for collection types. This framework enables you to work
18+ with data in memory at a high level, with the basic building blocks of
19+ a program being whole collections, instead of individual elements.
20+
21+ This style of programming requires some learning. Fortunately,
22+ the adaptation is helped by several nice properties of the Scala
23+ collections. They are easy to use, concise, safe, fast, universal.
3124
3225** Easy to use:** A small vocabulary of 20-50 methods is
3326enough to solve most collection problems in a couple of operations. No
@@ -40,7 +33,7 @@ collection updates is eliminated.
4033** Concise:** You can achieve with a single word what used to
4134take one or several loops. You can express functional operations with
4235lightweight syntax and combine operations effortlessly, so that the result
43- feels like a custom algebra.
36+ feels like a custom algebra.
4437
4538** Safe:** This one has to be experienced to sink in. The
4639statically typed and functional nature of Scala's collections means
@@ -59,10 +52,13 @@ libraries. As a result, using collections is typically quite
5952efficient. You might be able to do a little bit better with carefully
6053hand-tuned data structures and operations, but you might also do a lot
6154worse by making some suboptimal implementation decisions along the
62- way. What's more, collections have been recently adapted to parallel
63- execution on multi-cores. Parallel collections support the same
64- operations as sequential ones, so no new operations need to be learned
65- and no code needs to be rewritten. You can turn a sequential collection into a
55+ way.
56+
57+ ** Parallel** : The
58+ [ ` scala-parallel-collections ` module] ( https://index.scala-lang.org/scala/scala-parallel-collections/scala-parallel-collections )
59+ provides parallel execution of collections operations across multiple cores.
60+ Parallel collections generally support the same
61+ operations as sequential ones. You can turn a sequential collection into a
6662parallel one simply by invoking the ` par ` method.
6763
6864** Universal:** Collections provide the same operations on
@@ -89,10 +85,10 @@ traditional collection processing (three loops for an array, because
8985the intermediate results need to be buffered somewhere else). Once
9086you have learned the basic collection vocabulary you will also find
9187writing this code is much easier and safer than writing explicit
92- loops. Furthermore, the ` partition ` operation is quite fast, and can
93- be even faster on parallel collections on multi-cores. (Parallel
94- collections are available as a
95- [ separate library ] ( https://index.scala-lang.org/scala/scala- parallel- collections/scala-parallel-collections ) )
88+ loops.
89+
90+ Furthermore, the ` partition ` operation is quite fast, and can
91+ be even faster on parallel collections on multiple cores.
9692
9793This document provides an in depth discussion of the APIs of the
9894Scala collections classes from a user perspective. It takes you on
0 commit comments