Preface
This is a cookbook of problem-solving recipes about Scala 3, the most interesting programming language I’ve ever used. The book contains solutions to more than two hundred fifty common Scala programming problems, demonstrated with more than one thousand examples.
Compared to other Scala 3 learning resources, there are several unique things about this book:
-
As a cookbook, it’s intended to save you time by providing solutions to the most common problems you’ll encounter.
-
The book covers not only the Scala language but also recipes on Scala tools and libraries, including sbt, Spark, Scala.js, Akka actors, and JSON processing with the Play Framework.
-
The book takes a big dive into the Scala collections classes, using five chapters to demonstrate their use.
-
Output from the examples is shown either in the Scala interpreter or in comments after the code. As a result, whether you’re sitting by a computer, on a plane, or reading in your favorite recliner, you get the benefit of seeing their exact output. (Which often leads to, “Ah, so that’s how that works.”)
The Scala 3 Language
In the first edition of Scala Cookbook, I described Scala 2 as feeling like a combination of Ruby and Java. Back then I wrote, “My (oversimplified) Scala elevator pitch is that it’s a child of Ruby and Java: it’s light, concise, and readable like Ruby, but it compiles to class files that you package as JAR files that run on the Java virtual machine (JVM); it uses traits and mixins, and feels ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access