The Artima Developer Community
Sponsored Link

Programming in Scala Forum
Diff marked pdf for non final version(s)

2 replies on 1 page. Most recent reply: Feb 22, 2008 8:47 AM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Javier Diaz Soto

Posts: 29
Nickname: javierbds
Registered: Sep, 2005

Diff marked pdf for non final version(s) Posted: Feb 21, 2008 11:37 AM
Reply to this message Reply
Advertisement
Is it possible for the new version of the book to have some marks (like a left bar) marking new or modified text? It is not that I would not enjoy rereading all again ;), but I'd like to concentrate on new info ...


Calum MacLean

Posts: 9
Nickname: calummacle
Registered: Feb, 2003

Re: Diff marked pdf for non final version(s) Posted: Feb 22, 2008 6:00 AM
Reply to this message Reply
I've done a comparison of the table of contents, in order that I can get some idea of what's new. I've attached it below. It obviously doesn't include changed content in individual sections, but it's enough to get started with.
In general, I've noted new sections in existing chapters (e.g. Mapping to Java in chapter 4), and new chapters (e.g. 9 Control Abstraction).
I've also in some cases indicated content which has been removed, but I can't say whether it's actually been totally removed, or has just been moved to another chapter/section.
Happy reading!
Calum

Introduction

4 Classes and Objects
Mapping to Java
Variable scope
Semicolon inference
6 Functional Objects
A word of caution
7 Built-in Control Structures
Exceptions
Selecting from alternatives
Scope
Improving onTry expressions
Match expressions
Living without break and continue
8 Functions and Closures
[some reorganisation - some new stuff]
9 Control Abstraction [new chapter]
10 Composition and Inheritance
Conclusion
12 Case Classes and Pattern Matching
Conclusion
13 Exceptions [empty chapter - removed]
15 Collections
Overview of the library
Conclusion
16 Stateful Objects
Conclusion
18 Abstract Members and Properties
Conclusion
20 Implementing Lists
Conclusion
23 Actors and Concurrency
Programming with threads and locks [removed]
24 Extractors [new chapter]
25 Objects As Modules [new chapter]
26 Annotations [new chapter]
27 Combining Scala and Java
Java-specific annotations [removed]
Annotations
Existential types
Conclusion
28 Combinator Parsing [new chapter]

A ScalaDoc [removed]
Suggested Reading [new]

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Diff marked pdf for non final version(s) Posted: Feb 22, 2008 8:47 AM
Reply to this message Reply
> Is it possible for the new version of the book to have
> some marks (like a left bar) marking new or modified text?
> It is not that I would not enjoy rereading all again ;),
> but I'd like to concentrate on new info ...

We don't have a good way to do that, but here's some info I posted to the Scala mailing list that should help:

First of all, we tried to fix all typographical and coding errors that were reported via the Suggest link. So there are minor changes in all chapters. I also attempted to improve things people said were confusing, etc., that were reported, but only got that done in about the first 10 chapters.

The primary added and altered things are:

1. We added an introduction (page xx)
2. We use function value and function literal instead of closure and anonymous function. For the concept of function objects different from methods and local functions, we use "first-class function."
3. We changed the text so that we only use closure to mean a function value that captures free variables.
4. Added a section on how Scala variables and objects map to Java's on page 93, including a discussion of the terminology we use when speaking at the Scala level of abstraction.
5. Added a few paragraphs about designing abstractions on page 103.
5. Explained more about shadowing and why you can redefine variables in the interpreter on page 106.
6. Added a bit about semicolon inference on page 108.
7. Did a rewrite to some extent of chapter 7, Built-in Control Structures.
8. Also did a lot of work on chapter 8, Functions and Closures. It includes a new section on partially applied functions on page 177. Closures are introduced on 181. We added a section on repeated parameters on 184.
9. We split off portions of the old chapter 8 and made a chapter 9, Control Abstraction. One new thing in there is section 9.3, currying.
10. Chapter 15, Collections, has been fleshed out quite a bit.
11. Chapter 24, Extractors, is new.
12. Chapter 25, Objects as Modules, is new.
13. Chapter 26, Annotations, is new.
14. Chapter 27, Combining Java and Scala, has been updated quite a bit.
15. Chapter 28, Combinator Parsing, is new.
16. Added a lot of words to the glossary. Please check those out as well, and submit comments about them to help us make them better.

Oh, and check out the acknowledgements. They are updated too. I can't promise we'll put all these names in the printed book, because it will depend on how close our page count is a multiple of 8. But I wanted to show my appreciation for everyone who submitted comments through the Submit link. So everyone's name should be in there, in the order determined by this script (the # next to the name is the number of comments submitted):


val input = """
1 --- Kegan Gan
1 --- Ryan Boyer
... a whole bunch of other lines ...
92 --- Javier Diaz Soto
105 --- Tony Sloane
114 --- Blair Zajac
"""

import scala.collection.immutable.TreeSet
import scala.collection.immutable.TreeMap

var map = TreeMap[Int, TreeSet[String]]()

for (line <- input.split("\n")) {
val pairStrings = line.split("---")
if (pairStrings.length == 2) {
val num = pairStrings(0).trim.toInt
val name = pairStrings(1).trim
if (map.contains(num)) {
val newSet = map(num) + name
map += (num -> newSet)
}
else {
val newSet = TreeSet.empty[String] + name
map += (num -> newSet)
}
}
}

for {
num <- map.keys.toList.reverse
name <- map(num).elements
} println(name + ", ")


Thanks.

Bill

Flat View: This topic has 2 replies on 1 page
Topic: Error or Error on my part, page#70 Previous Topic   Next Topic Topic: copy/paste

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use