Jump to ratings and reviews
Rate this book

Programming Scala

Rate this book
Learn how to be more productive with Scala, a new multi-paradigm language for the Java Virtual Machine (JVM) that integrates features of both object-oriented and functional programming. With this book, you'll discover why Scala is ideal for highly scalable, component-based applications that support concurrency and distribution.

Programming Scala clearly explains the advantages of Scala as a JVM language. You'll learn how to leverage the wealth of Java class libraries to meet the practical needs of enterprise and Internet projects more easily. Packed with code examples, this book provides useful information on Scala's command-line tools, third-party tools, libraries, and available language-aware plugins for editors and IDEs.

448 pages, Paperback

First published January 1, 2009

61 people are currently reading
281 people want to read

About the author

Dean Wampler

8 books21 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
46 (20%)
4 stars
92 (40%)
3 stars
73 (31%)
2 stars
15 (6%)
1 star
3 (1%)
Displaying 1 - 21 of 21 reviews
Profile Image for Michelle.
30 reviews25 followers
June 3, 2015
I'm a bit disappointed about this book. Examples aren't always clear and with some more difficult aspects more information is desirable. However, it's efficient for looking up elements to refresh your memory. Not the ideal book to learn Scala from scratch.
Profile Image for David Cross.
Author 3 books5 followers
November 10, 2015
Gave up. Either Scala is too complex, this book is badly written or I'm a bit thick. This wasn't clarifying anything. I'm going back to Javascript.
Profile Image for Vladimir.
123 reviews
July 8, 2024
It's worth noting that the book is useless for beginners at all. It's hard to understand even basic languages concepts because writing language is too complex and you need to spent a lot of time to understand non trivial examples. It's a question for me why author couldn't simplify the style to demonstrate a different language aspects in the user friendly and intuitive way.
On the other side, the book might be useful as a cheat sheet for people who are already aware of Scala and want to refresh their minds.
150 reviews3 followers
November 25, 2017
I think it is very complete book, dealing with Scala with some depth. However, the style doesn't suit me. I usually read technical books on the go. And examples need to help me understand. It is difficult to separate my feelings towards Scala and my experience with this book. I feel I could use this book as as a study guide and really learn Scala inside out. But I don't like Scala and I don't quite like this book.
Profile Image for Lino.
177 reviews6 followers
February 4, 2017
A nice book that's really good in some places but suffers from disorganization and an overbroad target audience. It's not a first book to read on Scala. Odersky's "Programming in Scala" would be my pick for it. It is, however, a pretty good second.

Now, it doesn't start well for me. The first few chapters feel disorganized, miles away from the neatly structured "Programming in Scala" mentioned above. A lot of Scala's features feel randomly thrown at the reader and I didn't feel much cohesion there. The very first chapter is polluted with info about the REPL, Akka and sections such as "Pattern matching versus subtype polymorphism". Also, sometimes concepts are partially explained in one chapter only to be concluded much later. As an example, the `CanBuildFrom` from the collections library is first mentioned on chapter 5, then 6 and finally fully explained on chapter 12.

Another problem is that some code examples are more complex than necessary. I find it distracting. Some of these concepts are intricate enough. Having to keep a large class hierarchy in mind while we work through them doesn't help.

But the biggest flaw for me is that the book can't decide whether it's aimed at intermediate or beginner developers. All its flaws derive from that foundational mistake. It goes from "What Is Functional Programming?" to "Category Theory" and back to "Class and Object Basics".

On their defence, the "HOW TO READ THIS BOOK" section actually guides the reader according to how experienced they feel. But still, it's not clearly divided and sometimes the same chapter mixes both audiences. Chapters 4 and 5 for example go into such depth on pattern matching and implicits that no beginner Scala programmer would be able to understand and/or appreciate. The following chapter, though, is an introduction to functional programming. The author even writes "This chapter covers what I consider to be the essentials that every new Scala programmer needs to know." What are the essentials doing on chapter 6?

Just to finish the complaining, some of the more advanced concepts are exposed so superficially that the usefulness of having them in the book is actually negative: it detracts from the actual other good content.

When people start programming in Scala, it's normal to use it as just a better Java, settling on a comfortable subset of the language for a while. I think there's space for a book that takes you from that point on, ignoring all the introductory talk. This could have been it.

All this complaining might give the impression I hated the book. I didn't. Actually I quite enjoyed it, but just wished it was better. There's a lot of information here and the content itself is really good. There's quite a bit about pattern matching I previously ignored (chapter 4), same for implicits (chapter 5). The type system receives two full chapters (14 and 15). Finally you gotta love the author's honesty when he, on chapter 13 (visibility rules) writes "This chapter covers the details in depth and to be honest, it’s dry stuff".

I will reread it at some point. I learned a few new tricks. There's a lot here.
Profile Image for Ke.
4 reviews
February 19, 2017
I really enjoy reading this book, though it probably is much more enjoyable for people wishing to improve their understanding of programming/programming languages/functional programming/programming paradigms if they enjoy mathematics, especially of the abstract kind.

So far, I've read up to 40% of this book in a month or so, and I've come across some very insightful generalizations which, if understood intuitively, are very pleasant to think about. Case in point, the following statement:

"...At the end of the day, all programs input data, perform transformations on it, then output the results. Much of the “ceremony” in typical programs just obscures this essential purpose..."

This nugget + various other musings show that the authors themselves try to instill to the reader an intuitive deep understanding of programming that they themselves possess, and is not just another typical run-of-the-mill book which teaches techniques or goes into jargon without providing the necessary intuition.

Overall, this is a very pleasant read, and I hope others may be able to glean the same enjoyment, knowledge, and understanding that I've been able to derive from it thus far.
Profile Image for Michael.
163 reviews74 followers
February 25, 2012
A good and thorough introduction to Scala. Unfortunately this book is a bit dated by now, but that's hardly the author's fault, but mine for reading it too late.

Like many things written on Scala this seems to mostly have Java refugees as a target audience, not us functional programming aficionados who are curious about a functional language that kinda made it to the mainstream. Sure, an understanding of the JVM and Java interoperability helps, but I've acquired that through Clojure. Overall I find the many Java comparisons more disturbing that useful, but I'd imagine that for many people reading this book they are exactly what they are looking for. Some of the code examples are a bit too superficial for my taste, inheritance examples with classes like C1 and C2 and traits like T1 just beg to be skimmed over, which is a shame since the topics are important.

I'd still recommend it as a decent book to quickly get an idea of the language, I just wish someone would write something like "Scala for functional programmers" or something.
Profile Image for Andi Dirgantara.
33 reviews
February 8, 2017
The best Scala programming book I've read. This book was written by professional engineer from Lightbend, formerly Typesafe, a well known IT company that support Scala a lot like creating Activator, Dean Wampler. This book also describe not just best practices for using Scala but also the concept (far) behind it. Like why Scala adopt functional and OOP together? Why Scala bring functional (again) to well established JVM environment? Which part of OOP is not suitable for what that must tackled by functional approach? So this book is very recommended to read for those who want to learn not just Scala as a programming language, but also the concept that brought Scala become one of the most wanted programming language. This book also good for academic citation I think.
Profile Image for Thomas.
Author 1 book57 followers
August 14, 2014
Disclosure: I participated in the technical review of this new edition. But without any reservation I can say this book has only gotten better in the new, very much revised edition. If you want a very thorough survey of the language, you would do well with Dean's update.
379 reviews10 followers
May 19, 2015
Abbandonato dopo meno di 100 pagine perché completamente incomprensibile. Dà per scontate troppe informazioni, probabilmente conosciute da chi programma già in qualche linguaggio funzionale o è abituato a notazioni matematiche.
Profile Image for Thomas.
Author 1 book57 followers
February 20, 2017
Just to be clear I read the prerelease "rough cut" of this book from O'Reilly. I haven't read it in detail, but as near as I can tell, it handily beats the other Scala books out.
Profile Image for Leo Polovets.
112 reviews55 followers
January 14, 2011
Good content and style, but seems like it covers too many topics. That might be more a critique of Scala than of the book.
Profile Image for Situagent.
6 reviews3 followers
February 8, 2011
Insightful book, well worth reading. I look forward to the next addition, which I hope will address Scala 2.81 or even 2.9.
Profile Image for Zachary.
12 reviews1 follower
May 16, 2016
Version 2 of this book covers everything you need to get started with Scala and it's coves like type lambdas and the type system.
Profile Image for Aaron.
20 reviews
April 30, 2017
Having never been a Java developer, I may be outside the core audience for this text, which spends a lot of time defending and championing Scala’s design decisions in relation to the limitations of Java as a functional programming language. This makes sense, as industry trends even now are migrating many legacy Java codebases to Scala.

But there is definitely an emergence of data applications shifting from Python/Hadoop to Scala/Spark as well, and perhaps the next edition of this book will spend more time on that perspective. Even with the availability of PySpark, it’s likely that the typical Spark user will eventually need to be fluent in both Python and Scala idioms, and start thinking more deeply about interoperability.

Nevertheless, the book is a useful guided tour through Scala’s key concepts and quirks. I found the most effective chapters to be the ones discussing the larger precepts of functional programming and Big Data, rather than the ones zeroing in on specific Scala syntax and semantics.

The coding examples are illustrative, though it feels like some of them could still be pared down a bit more, and the notes describing the effect of each statement or code block would perhaps be more useful as comments in the source. Even the simplest Scala application is fairly intimidating to newcomers like me, so I suspect that examples like the ones here delving into Actors and other larger systems would be good candidates for a literate programming approach, abstracting away details in a organized hierarchical fashion that is easier to read.

I look forward to putting the lessons from this book in action— it’s allowed me to at least hit the ground running somewhat, and it will be very interesting to see how I absorb and study the language further in a practical production context.
Displaying 1 - 21 of 21 reviews

Can't find what you're looking for?

Get help and learn more about the design.