TheDet (49) [Avatar] Offline
#1
Hi Josh,

finished reading Chapter 8 now. A fine, useful and informative writing!

Here only a few notes that would perhaps integrate the content a little more:

- 8.1.6 IndexedSeq: "An IndexedSeq can be created using the factory method defined on IndexedSeq object. By default, this will create an immutable Vector,..."

This was useful, so I would like to see similar hints about creation and the default implementation for the other types too.
(NB: The next sentence, "IndexedSeq collections have an updated method" is confusing, without special font for "updated" or other hint that updated is not an adjective to method.)


- Ch. 8.2 Immutable Collections

It would be nice to have an extended hierarchy diagram here, so that visually thinking people like me could organize the further described collections easier into the before discussed hierarchy.

- 8.2.1 Vector could give a back reference to 8.1.6 and repeat that it is the default for IndexedSeq, just to tie things together. Also the Vector section is the only one without any code example. I would appreciate some lines of code here, because I memorize things visually and some snippets make that easier.

- Ch. 8.5 :
The CanBuildFrom could perhaps get a little more explanation. While its usage is clear in the context (at least to me), the question arises where this comes from, what its general purposes are. E.g. is it used especially for collections or has it broader meaning? Is it a type class too?

Regarding the <:< parameter: I am still confused when I see implicit parameters which are not applied visibly in the method body.

All in all I really like this Collection writing.

KR
Det

Beside: Page 242 (8.2.3) refers to Section 8.1.1 for TraversableView. Think that should be 8.4.1 ?
There is still a TODO comment on 8.4.2, p.249 ?
joshua.suereth (60) [Avatar] Offline
#2
Re: Chapter 8 - Scala Collections
Thanks for the suggestions. I'll see what I can do. I did have a collection hierarchy diagram for Vector/Stream etc. but it was rather cluttered IMHO. I'll toy around with trying to declutter the diagram and see if I can get something I'm happy with.