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
- Scala Official Site — Latest news, downloads
- Scala 3 Documentation — Official Scala 3 documentation
- Scala 2 Documentation — Official Scala 2 documentation
- Scala API Docs — Standard library API
Learning Resources
Officially provided learning materials.
- Tour of Scala — Quick tour of core features
- Scala 3 Book — Step-by-step tutorial
- Scala Exercises — Interactive learning
Build Tools
Official documentation for build tools used in Scala projects.
- sbt Documentation — Official sbt documentation
- Mill Build Tool — Mill documentation
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”
- Authors: Noel Welsh, Dave Gurnell
- Free online version
Advanced
Books covering advanced topics like type classes and effect systems.
“Scala with Cats”
- Authors: Noel Welsh, Dave Gurnell
- Free online version
“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 Area | Recommended Library | Reference |
|---|---|---|
| Functional Basics | Cats | Scala with Cats (free) |
| Async/Concurrency | ZIO or Cats Effect | ZIO Official Docs |
| Web Development | http4s + Circe | http4s Tutorial |
| Data Processing | Spark | Spark 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.
- Scala & Functional Programming Essentials — Rock the JVM
- Functional Programming Principles in Scala — Coursera (Martin Odersky)
- Scala 3 New Features — Official documentation
Paid
Paid courses for more structured learning.
- Rock the JVM — Comprehensive Scala courses
- Zionomicon — ZIO deep dive
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
- Cats — Type class library
- ZIO — Effect system
- Cats Effect — Async/concurrency
Web Development
- Play Framework — Web framework
- http4s — Functional HTTP
- Akka HTTP — Actor-based HTTP
Data Processing
- Apache Spark — Distributed data processing
- Apache Kafka — Streaming platform
- Doobie — Functional JDBC
JSON
Testing
- ScalaTest — Testing framework
- MUnit — Lightweight testing
- ScalaCheck — Property-based 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
- Scala Users Forum — Official forum
- Scala Discord — Real-time chat
- Typelevel Discord — Cats, fs2, etc.
Q&A
Blogs/News
- Scala Times — Weekly newsletter
- Typelevel Blog — Functional Scala
- Li Haoyi’s Blog — Scala tips
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.
- Scala Days — Main Scala conference
- Scala.io — European Scala conference
- Typelevel Summit — Functional Scala
Recommended Learning Path#
Step-by-step learning path suggestions.
Beginners
- Environment setup with Quick Start
- Core concepts with Tour of Scala
- “Scala for the Impatient” or Coursera course
- Simple project practice
Intermediate
- Read “Programming in Scala” thoroughly
- Learn Cats or ZIO
- Apply functional style to real projects
Advanced
- “Functional Programming in Scala”
- “Scala with Cats”
- Deep dive into type system (Shapeless, Type-level programming)
- Open source contributions