Programming Scala

Programming Scala, Third Edition covers Scala 3. It was published June, 2021 by O'Reilly Media. You can read it on the O'Reilly online learning platform or purchase ebook or print copies from these sellers:

See my blog series about Scala 3, where I cover many highlights of what's new.

I also created this synopsis of Scala 3 changes, which I used as notes for several talks on Scala 3, such as the November 20, 2020 meeting of the Chicago Area Scala Enthusiasts.

Why Programming Scala?

Programming Scala, Third Edition is a comprehensive and up-to-date introduction to Scala 3. It is written for experienced developers new to Scala, as well experienced Scala developers migrating to Scala 3.

The repo for the book's code examples is Apache-licensed open source. If you want the examples for the second edition, focused on Scala 2, see the v2.1.0 release tag, which closely follows the organization of the second edition of the book, but it has been updated for Scala 2.12 and 2.13. The current master branch only supports Scala 3.

I wrote the Scala book I would want to read, if I were starting from the following background:

  • I'm an experienced, professional developer building enterprise applications or I'm a data scientist who needs to work with a Scala-based infrastructure.
  • I know how to program already. I have experience with Java, Python, or other languages.
  • I know Object-Oriented Programming (OOP), but not necessarily Functional Programming (FP).
  • I want to get better at FP, while still leveraging my OOP skills.
  • I'm serious about learning Scala.

I would read Programming Scala, Third Edition to achieve the following goals:

  • Learn the common idioms, libraries, tools, and techniques used by experts building production software in Scala.
  • Understand the major features of Scala and how to use them effectively.
  • Understand why Scala is the language of choice for data engineering work in Big Data environments with tools like Spark and Kafka.
  • Learn why Scala is an excellent language for state of the art microservice- and cloud-based production systems.

My goal for the reader is to really know the language, including the motivations for different Scala features and how they work. I want you to learn the common techniques used to solve various design problems, as well as general best practices and idioms. There are some more obscure topics that I omit and some advanced topics that I only briefly mention, but you should be expert in Scala when you finish this book.

To discuss the book, the code examples, etc. use one of the following forums. Bug reports (and patches!) are especially welcome:

If you're using Spark and you want a quick introduction to Scala aimed at Spark developers, check out my free tutorial, Just Enough Scala for Spark.