Chapter 2Taking Scala for a Ride

Surprisingly, it’s very easy to get Scala code up and running, whether you’re creating a short script or a full-fledged enterprise application. You can use any of the available IDEs or just a lightweight editor.

In this chapter, you’ll learn how to quickly run your Scala scripts from the command line and how to compile multiple files containing Scala code. If, at any time, you’re curious what Scala’s thinking—what the inferred types of variables are—you can quickly jump into the REPL where Scala interactively reveals valuable details. There’s no better way to learn Scala than by trying out some examples, so type the code and run them as you read along. Let’s get started with the most fun and interactive tool—the ...

Get Pragmatic Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.