O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the REPL

Quite a few languages provide a REPL—read-eval-print loop—a tool that’s a convenient way to key in snippets of code and interactively see the code come to life immediately. In addition to executing code snippets, REPLs often provide details that are not easily accessible at runtime. That makes REPL a special tool for experimentation and also to learn how the language infers types for variables and functions.

The command-line shell named scala is the REPL for Scala and it’s the quickest way to try out the language. Using this tool we can start playing with small code snippets. This is not simply a learning tool; it comes in handy during development of large applications as well. You can quickly try out some code ideas—micro prototyping—in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required