Get up to speed on Scala, the JVM language that offers all the benefits of a modern object model, functional programming, and an advanced type system. Packed with code examples, this comprehensive book shows you how to be productive with the language and ecosystem right away, and explains why Scala is ideal for today's highly scalable, data-centric applications that support concurrency and distribution.

This second edition covers recent language features, with new chapters on pattern matching, comprehensions, and advanced functional programming. You’ll also learn about Scala’s command-line tools, third-party tools, libraries, and language-aware plugins for editors and IDEs. This book is ideal for beginning and advanced Scala developers alike.

Program faster with Scala’s succinct and flexible syntax

Dive into basic and advanced functional programming (FP) techniques

Build killer big-data apps, using Scala’s functional combinators

Use traits for mixin composition and pattern matching for data extraction

Learn the sophisticated type system that combines FP and object-oriented programming concepts

Explore Scala-specific concurrency tools, including Akka

Understand how to develop rich domain-specific languages

Learn good design techniques for building scalable and robust Scala applications

Dean Wampler

Dean Wampler, Ph.D. is a Consultant for Typesafe, where he specializes in helping clients succeed with Scala and Functional Programming projects. He works with "Big Data" tools like Hadoop, Spark, and Machine Learning libraries, and Reactive tools like Akka and Play. Dean is an O'Reilly author and a frequent conference speaker and organizer. He has a Ph.D. in Physics from the University of Washington.

Alex Payne

Alex Payne is Platform Lead at Twitter, where he develops services that enable programmers to build atop the popular social messaging service. Alex has previously built web applications for political campaigns, non-profits, and early-stage startups, and supported information security efforts for military and intelligence customers. In his free time, Alex studies, speaks, and writes about the history, present use, and evolution of programming languages, as well as minimalist art and design.

The animal on the cover of Programming Scala is a Malayan tapir (Tapirus indicus),also called an Asian tapir. It is a black-and-white hoofed mammal with a round, stockybody similar to that of a pig. At 6–8 feet long and 550–700 pounds, the Malayan is thelargest of the four tapir species. It lives in tropical rain forests in Southeast Asia.

The Malayan tapir’s appearance is striking: its front half and hind legs are solid black,and its midsection is marked with a white saddle. This pattern provides perfect camouflagefor the tapir in a moonlit jungle. Other physical characteristics include a thickhide, a stumpy tail, and a short, flexible snout. Despite its body shape, the Malayan tapiris an agile climber and a fast runner.

The tapir is a solitary and mainly nocturnal animal. It tends to have very poor vision,so it relies on smell and hearing as it roams large territories in search of food, trackingother tapirs’ scents and communicating via high-pitched whistles. The Malayan tapir’spredators are tigers, leopards, and humans, and it is considered endangered due tohabitat destruction and overhunting.