Theoretical CS

1.2 Taste of Scala

Scala

The Scala programming language combines object-oriented and functional programming in one concise, high-level language. It has a very expressive syntax, and is familiar to both Java and Python.

Tour of Scala

Worksheets

Most of our classwork will not be complete projects, but rather snippets of code that showcase the concepts that we are learning. A Scala worksheet is a great environment to work in!

You can define a Scala worksheet file by giving it the .worksheet.sc extension.

Basics

Complete the attached worksheet. You should familiarize yourself with how Scala handles the following concepts.

⊕ def, val, var, types
⊕ conditionals
⊕ while / for loops
⊕ functions


<< 1.1 Setting up the Environment 2.1 Linear Structures >>