Scala Cheat Sheet

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

The reference material consulted while preparing these pages is listed in the section bibliography.

A single-page, colour-coded summary of the Scala language, written against Scala 3.10 (3.10.0, announced on 12 October 2026; JDK 17 or newer, with the differences on the 3.9 LTS line named where they matter) and checked on 2026-10-16, with additions after Scala 3.3 labelled by release — running code with Scala CLI and sbt, basics and literals, string interpolation, methods and their parameter kinds, optional braces and end markers, control flow and pattern matching, tuples, classes, objects, traits, case classes, enums and the modifiers sealed, open and final, functions and currying, the type system (bounds, variance, union and intersection types, opaque types, type lambdas and match types), givens, using clauses, context bounds, extension methods, type classes and derives, the collection operations used most, Option, Either, Try and Future, inline and macros, compiler flags, the Scala Toolkit libraries (MUnit, OS-Lib, uPickle, sttp and Cask), and a strip of Scala 2 forms and their Scala 3 replacements — handy for quick memorization or as a downloadable PDF desk reference.

For the full explanation, every option, and additional examples, see the dedicated pages:

Start here — Scala Reference.

Error handling — Option & Null Safety and Either & Try.

Java interoperability — Using Java from Scala and Calling Scala from Java.

Ecosystem — Ecosystem.

References

The PDF summarizes the official documentation; each source is cited in full on the page listed above that covers it, and in the section bibliography.