Your Setup

Option 1: Install Scala CLI

  • How to install
  • The Scala-CLI website
  • Show download options
  • Mac/Windows/Linux installs
  • scala-cli is becoming the new scala

Option 2: Scastie

  • The Scastie website
  • Works like the REPL
  • Need to use println more
  • Configuration options
  • Mention that it uses sbt
    • Also sends your code somewhere to be compiled

If you want to start with Scastie, that’s fine. Will need to use scala-cli later for scripts and applications.

Exercises and examples

Those were both created for my book, Learn Scala 3 The Fast Way!

Significant Indentation Syntax

  • different from Scala 2
  • I indent with 4 spaces
    • easier to read, especially in books
    • not the Scala standard
  • Curly braces
    • Anything in curly braces is a block of code
    • The result of a BoC is the value of the last expression


  • They’re the same as C, Java, and most other languages