Scala books

As a Scala instructor, I often get asked about books for learning the language at different levels of expertise.

This is my attempt to summarize the best books out there.

Please, if you spot any omissions or inaccuracies, let me know.

Disclaimers

  • I have read some books thoroughly, but not all. Some I have evaluated with a rather fast scanning.

  • I have no intention to diminish the work of any of the book authors. Putting a book together is a tremendous endeavour, and I'm very thankful for all the work they've done.

About the table below

I've classified books based on their target experience level, as such:

  • Beginner books, in green, require little related experience.

  • Intermediate books, in yellow, expect some level of knowledge in related technologies.

What about the other tags I've included?

  • Hands-on: Does the book provide code samples and exercises for the reader? (Minimal, Somewhat, Very)

  • Reference: Is this a good book to keep as reference material once you're somewhat comfortable and are starting to do real work with the language?

  • FP ↔ OO: Where does this book fall in the Functional-Programming to Object-Oriented continuum? FP means the book is focuses on how to write code in Scala that meets the Functional Programming principles. OO means functions have a relatively short treatment and Functional Programming does not permeate most of the book. Hybrid means somewhere in between.

The books

Title Authors Year Hands-on Reference FP ↔ OO
Atomic Scala Bruce Eckel, Dianne Marsh 2015 Very No OO
Beginning Scala Vishal Layka, David Pollak 2015 Minimal No Hybrid
Scala for Java Developers Thomas Alexandre 2014 Somewhat No OO
Functional Programming in Scala Paul Chiusano, Rúnar Bjarnason 2014 Very No FP
Learning Scala Jason Swartz 2014 Somewhat Maybe Hybrid
Programming in Scala Martin Odersky, Lex Spoon, Bill Venners 2016 Somewhat Yes Hybrid
Scala in Action Nilanjan Raychaudhuri 2013 Minimal No Hybrid
Scala in Depth Joshua D. Suereth 2012 Minimal No Hybrid
Scala Cookbook Alvin Alexander 2013 Very Maybe OO
Programming Scala Dean Wampler, Alex Payne 2014 Somewhat Maybe Hybrid
Scala for the Impatient Cay S. Horstmann 2016 Somewhat Maybe Hybrid

 

A few words about each book

  • Atomic Scala: Very well structured book, carefully thought out. I love the small exercises. It's unique among this list in that it target readers with little or no programming background! Great as an introduction. Focuses on the language features, not on the patterns that arise with its usage. Barely mentions Functional Programming.

  • Beginning Scala is clearly tailored to inexperienced developers, and provides a somewhat practical approach. Several advanced topics are missing, but that's expected for a book with this focus.

  • Functional Programming in Scala is a fabulous book, alas not an easy read. It's clearly written with Functional Programming at its core, and it will challenge the reader to solve many non-trivial exercises. Even for some of us who don't necessarily want to be FP purists, this book is an amazing experience.

  • Learning Scala is a well written book, that provides a good introduction to the language. It provides, however, less exercises than I would like.

  • Programming in Scala is clearly a must-have. Written by the creator of the language and two tremendously experienced developers. Very thorough, and a great book to have as a reference. It provides many small examples as you progress. Sadly, as is the case with most books, it provides no additional exercises for the reader to practice and deepen her understanding.

  • Programming Scala stands out as a book for developers that have related experience. It provides very valuable patterns and practices, and goes beyond the language and into other valuable tools, such as Actors, IDEs, build tools, and several others.

  • Scala Cookbook is a very practical and useful list of recipes - small problems solved using Scala. Despite it being almost 3 years at the time of writing this, it's not showing its age much just yet.

  • Scala for Java Developers focuses on a very practical use - how to write a Web application backed by a Database while using Scala. It's not a great alternative for learning the language itself.

  • Scala for the Impatient focuses on being very practical from the very beginning, and it does a very good job at it. It provides small exercises as you progress, and you find yourself playing with the language from very early on.

  • Scala in Action is a solid book, but its age is starting to show, which concerns me. It focuses less on learning the language, and more on how to build an application with it.

  • Scala in Depth is another great book that is starting to show some wrinkles after a few years of its last edition. Would be great to have an updated edition.

So, what do I recommend?

If you want to learn the language, I recommend this combination (in this order):

  • Atomic Scala as an introduction, and to get you warmed up.

  • Programming in Scala to fill some gaps and to always keep around for later reference.

  • Functional Programming in Scala to build (or strengthen) your FP muscles and start your journey into this wonderful (but not always easy) path.