A collection of reference materials helpful for learning Scala. Resources are categorized from official documentation to books, online courses, and communities.

TL;DR - Top Recommendations
  • Official Docs: Scala 3 Book - Step-by-step tutorial
  • Beginner Book: “Scala for the Impatient” - Optimal for quick learning
  • Functional Deep Dive: “Scala with Cats” (free online) - Master type classes
  • Online Practice: Scastie - Run code instantly in browser
  • Community: Scala Discord - Real-time Q&A

Official Documentation#

Official Scala site and documentation provide the most accurate and up-to-date information.

Scala Official

Learning Resources

Officially provided learning materials.

Build Tools

Official documentation for build tools used in Scala projects.

Key Points
  • Starting Point: Tour of Scala for quick overview of core features
  • Scala 3: Learn from Scala 3 Book for new projects
  • Build: sbt is standard, Mill is fast alternative

Books#

Scala learning books organized by difficulty level.

Beginner Books

Recommended books for those new to Scala.

  • “Programming in Scala” (4th Edition)

    • Authors: Martin Odersky, Lex Spoon, Bill Venners
    • Authoritative book by Scala’s creator
  • “Scala for the Impatient” (3rd Edition)

    • Author: Cay S. Horstmann
    • Recommended for those who want to learn Scala quickly

Functional Programming

Books covering functional programming concepts and patterns in depth.

  • “Functional Programming in Scala” (2nd Edition)

    • Authors: Michael Pilquist, Rúnar Bjarnason, Paul Chiusano
    • Famous “Red Book”, deep FP learning
  • “Essential Scala”

Advanced

Books covering advanced topics like type classes and effect systems.

  • “Scala with Cats”

  • “Practical FP in Scala”

    • Author: Gabriel Volpe
    • Practical functional programming
Key Points
  • Beginner: “Scala for the Impatient” (quick learning) or “Programming in Scala” (deep learning)
  • Free: “Essential Scala”, “Scala with Cats” available online
  • Functional Deep Dive: “Functional Programming in Scala” (Red Book)

Real-World Library Preview#

A brief introduction to how concepts learned in this guide are applied in real-world libraries.

Cats: Type Classes in Practice

Explore how the patterns learned in Type Classes are actually used in Cats.

// Type class pattern learned in this guide
trait Monoid[A]:
  def empty: A
  def combine(x: A, y: A): A

// How it's used in Cats
import cats.syntax.all.*
import cats.Monoid

// Using already defined instances
List(1, 2, 3).combineAll  // 6 (uses Monoid[Int])
List("a", "b").combineAll // "ab" (uses Monoid[String])

// Apply to custom types
case class Order(total: Int, items: Int)

given Monoid[Order] with
  def empty = Order(0, 0)
  def combine(x: Order, y: Order) =
    Order(x.total + y.total, x.items + y.items)

List(Order(100, 2), Order(200, 3)).combineAll
// Order(300, 5)

Related Concepts: Type Classes, Implicits/Given

ZIO: Functional Effect System

Higher-Order Functions and For Comprehensions shine in ZIO.

import zio.*

// Expressing side effects as values
val readLine: ZIO[Any, IOException, String] = Console.readLine
val printLine: String => ZIO[Any, IOException, Unit] = Console.printLine

// Sequential execution with for comprehension
val program: ZIO[Any, IOException, Unit] = for
  _    <- printLine("Enter your name:")
  name <- readLine
  _    <- printLine(s"Hello, $name!")
yield ()

// Nothing is executed at this point (pure value)
// Unsafe.unsafe { implicit u => Runtime.default.unsafe.run(program) }

Related Concepts: For Comprehensions, Functional Patterns

http4s: Functional HTTP

Pattern Matching and Case Classes utilized in routing.

import org.http4s.*
import org.http4s.dsl.io.*

// HTTP routing with pattern matching
val routes = HttpRoutes.of[IO] {
  case GET -> Root / "users" / IntVar(id) =>
    Ok(s"User $id")

  case req @ POST -> Root / "users" =>
    req.as[User].flatMap(user => Created(user.asJson))

  case GET -> Root / "health" =>
    Ok("healthy")
}

Related Concepts: Pattern Matching, Case Classes

Circe: JSON Type Classes

Type Classes and Generics used for JSON conversion.

import io.circe.*
import io.circe.generic.auto.*
import io.circe.syntax.*

// Just define case class and JSON conversion works automatically
case class User(name: String, age: Int)

val user = User("Alice", 30)
user.asJson.noSpaces  // {"name":"Alice","age":30}

// Parsing also uses type classes
"""{"name":"Bob","age":25}""".as[User]
// Right(User("Bob", 25))

Related Concepts: Case Classes, Type Classes

Next Learning Directions

Recommended libraries and learning resources based on areas of interest.

Interest AreaRecommended LibraryReference
Functional BasicsCatsScala with Cats (free)
Async/ConcurrencyZIO or Cats EffectZIO Official Docs
Web Developmenthttp4s + Circehttp4s Tutorial
Data ProcessingSparkSpark Scala API
Key Points
  • Cats/ZIO: Functional programming libraries, type classes and effect systems
  • http4s + Circe: Functional web development stack
  • Spark: Big data processing, requires Scala 2

Online Courses#

Video courses for learning Scala.

Free

High-quality free course materials.

Paid

Paid courses for more structured learning.

Key Points
  • Free Recommendation: Coursera’s Martin Odersky course (Scala creator)
  • Paid: Rock the JVM (comprehensive), Zionomicon (ZIO deep dive)
  • Scala 3: Must-read New Features page in official documentation

Library Documentation#

Links to official documentation of major Scala libraries.

Functional Programming

Web Development

Data Processing

JSON

Testing

Key Points
  • Functional: Cats (type classes), ZIO (effect system), Cats Effect (async)
  • Web: http4s (functional), Play (full-stack), Akka HTTP (actor-based)
  • Data: Doobie (DB), Circe (JSON), Spark (distributed processing)

Community#

Channels for communicating with Scala developers.

Forums/Discord

Q&A

Blogs/News

Key Points
  • Real-time Questions: Scala Discord, Typelevel Discord
  • Q&A: Stack Overflow (search), Reddit r/scala (discussions)
  • Latest Info: Subscribe to Scala Times weekly newsletter

Tools#

Tools to boost development productivity.

IDE

Utilities

  • Scastie — Online Scala execution ⭐ Run all examples from this guide here!
  • Scaladex — Library search
  • Scalafmt — Code formatter
  • Scalafix — Refactoring tool
Key Points
  • IDE: IntelliJ (mature), VS Code + Metals (lightweight)
  • Essential Tools: Scastie (online execution), Scaladex (library search)
  • Code Quality: Scalafmt (formatting), Scalafix (refactoring)

Conferences#

Major Scala community conferences.

Step-by-step learning path suggestions.

Beginners

  1. Environment setup with Quick Start
  2. Core concepts with Tour of Scala
  3. “Scala for the Impatient” or Coursera course
  4. Simple project practice

Intermediate

  1. Read “Programming in Scala” thoroughly
  2. Learn Cats or ZIO
  3. Apply functional style to real projects

Advanced

  1. “Functional Programming in Scala”
  2. “Scala with Cats”
  3. Deep dive into type system (Shapeless, Type-level programming)
  4. Open source contributions