Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Scala for the impatient
Horstmann C., Addison-Wesley Professional, Upper Saddle River, NJ, 2012. 384 pp. Type: Book (978-0-321774-09-5)
Date Reviewed: Aug 31 2012

You have probably heard that the Scala language combines functional and object-oriented programming; runs on the Java Virtual Machine (JVM), so it can leverage all the code written in Java; and has a good reputation for writing concurrent programs. How do you go about learning to program in this language? A quick search will turn up the standard guide [1] coauthored by the creator of the language, Martin Odersky, but this is an 800-plus-page tome. Is there no other way?

This new book by Horstmann might be the answer. It sports John Tenniel’s white rabbit illustration from Alice’s adventures in Wonderland, and is appropriately geared to those who feel they have no time to lose. The premise of the book is that you can teach a language by presenting it succinctly, requiring attention from your readers, and helping them digest the material by getting their hands dirty with code and online documentation. The chapters are short, and written in a fast-clipped style. This no-nonsense approach fits the book’s purpose well. The whole book can be read from cover to cover in a couple of days, but that alone will not make you a Scala programmer, of course. To grasp the book’s content firmly, and gain some experience in Scala programming, it is necessary to practice the material the author presents by doing the exercises at the end of each chapter. At some points, the author takes short excursions into the underlying workings of the language compiler, the JVM, and the rationale behind decisions in the language’s design. We could use more of these juicy bits. The book references Expert C programming, by Peter van den Linden [2]; Horstmann should have followed this example a bit further and devoted more space to exploring and explaining Scala’s intricacies. It turns out that there is a method to many of Scala’s complexities, namely, that of designing a language for growth [3]. This book could have given us more on that.

Horstmann presents a lot of information in 350 or so pages. He starts with four chapters on the basics: how to use Scala interactively, control structures and functions, arrays, and maps and tuples. He then moves on to classic object-oriented territory in the next four chapters, covering classes, objects, packages and imports, and inheritance. This is followed by six chapters on more advanced topics, including files, traits, operators, higher-order functions, collections, and pattern matching and Scala’s case classes. Really advanced material takes up the last third of the book, with chapters on annotations, Extensible Markup Language (XML) processing, type parameters, advanced types, parsing, actors, implicits, and delimited continuations.

There are some problems, which could be addressed in a future edition. Some of the cross-references are missing or wrong, or seem to be, in part because the reader is not alerted to the fact that some things are really explained in later chapters. Some basic Scala ideas are not included at all. For example, readers are strangely told that partial functions are instances of PartialFunction, but not that functions are really instances of related traits. Although delimited continuations, which can be used via a compiler plugin, are presented in some detail, there is only a passing reference to Akka actors, which are poised to replace the current library of actors.

Experienced programmers and advanced students who want to get a grip on Scala quickly will find the book just the tool for the job. Programmers that already know Scala will appreciate it as a good refresher.

Reviewer:  Panagiotis Louridas Review #: CR140509 (1301-0009)
1) Odersky, M.; Spoon, L.; Venners, B. Programming inScala (2nd ed.). Artima, Walnut Creek, CA, 2010.
2) van der Linden, P. Expert C programming: deep C secrets. Prentice-Hall, Upper Saddle River, NJ, 1994.
3) Steele, Guy L., Jr. Growing a language. Higher-Order and Symbolic Computation. 12, 3 (October 1999), 221--236. http://dx.doi.org/10.1023/A:1010085415024.
Bookmark and Share
  Featured Reviewer  
 
Concurrent, Distributed, And Parallel Languages (D.3.2 ... )
 
 
Java (D.3.2 ... )
 
 
Multiparadigm Languages (D.3.2 ... )
 
 
Language Classifications (D.3.2 )
 
 
Language Constructs and Features (D.3.3 )
 
 
Reference (A.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Concurrent, Distributed, And Parallel Languages": Date
Parallel programming
Coffin M., Silicon Press, Summit, NJ, 1992. Type: Book (9780929306131)
Apr 1 1993
Tutorial: compiling concurrent languages for sequential processors
Edwards S. ACM Transactions on Design Automation of Electronic Systems 8(2): 141-187, 2003. Type: Article
Jul 18 2003
Compositional parallel programming languages
Foster I. ACM Transactions on Programming Languages and Systems 18(4): 454-476, 1996. Type: Article
Jan 1 1997
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy