Part 1. Scala: the basics

 

First things first.

In Scala in Action, chapter 1 focuses on Scala and why you should pick it as your next language. You’ll learn how Scala’s high-level features compare with programming languages you may be very familiar with. If you’re an object-oriented programmer, you’ll quickly get comfortable with Scala; if you’ve used a functional programming language, Scala won’t look much different because Scala supports both programming paradigms.

Scala is one of those rare languages that successfully integrates both object-oriented and functional language features. This makes it powerful because it gives you more in your toolbox to solve programming problems. If you have existing Java applications and are looking for a language that will improve your productivity and at the same time reuse your existing Java codebase, you’ll like Scala’s Java integration and the fact that Scala runs on the JVM platform.

It’s important, when learning something new, to become comfortable in the heretofore unknown environment. Chapter 2 stays within the middle of the road, helping you become comfortable with the basics of Scala and its environment so you can start working with it and writing Scala programs. Early on, the focus is on only the Scala interpreter and its REPL environment to keep things simple, but you’ll also learn about the basic Scala types, functions, for-comprehension, pattern matching, among other things.