Scala Roadmap
This Scala Roadmap is a free, full-text syllabus of 165 lessons in 32 stages, starting with Introduction and ending with Macros & the Type System. It suits anyone who wants to learn Scala, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.
Last updated
Reading is open to everyone. Sign in to join this roadmap and track what you finish.
Continue learning
1. IntroductionIntroduction
0%Introduction
5 topics · 4 sub-topics · 0 completed
The diagram draws the same 165 lessons as a map, with lines showing the order. It needs JavaScript; the full syllabus below lists every lesson as text.
Full syllabus: every lesson in the Scala roadmap
32 stages and 165 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.
Stage 1: Introduction
Introduction
Scala is a programming language that blends object-oriented and functional programming ideas. It runs on the Java Virtual Machine (JVM) and can also be compiled to JavaScript. This makes it possible to use Scala for a wide variety of tasks, from building large-scale systems to writing web applications and scripts.…
Docs
Scala's official documentation is a fantastic place to start learning the language and its features. It provides comprehensive guides, tutorials, and API references that cover everything from basic syntax to advanced concepts. You can find clear explanations, practical examples, and detailed descriptions, making it…
Books
Books offer a structured and comprehensive way to learn a new programming language. They typically cover fundamental concepts in detail, building upon previous knowledge to provide a solid understanding. Good books often include examples, exercises, and practice problems that allow you to reinforce what you've…
Courses
Courses offer a structured learning path, typically designed by experts, that guides you through the fundamentals to advanced concepts. They often include hands-on exercises, projects, and assessments to reinforce learning and provide practical experience. Courses come in various formats, like online videos,…
YouTube
YouTube can be a fantastic resource for learning Scala. On the platform, you can find a wide variety of content, from beginner-friendly tutorials introducing basic concepts to in-depth explanations of advanced topics. Many experienced Scala developers and educators create and share their knowledge on YouTube, often…
Stage 2: Setting Up Scala
Setting Up Scala
Setting up Scala involves installing the Scala compiler and build tools on your system. This allows you to write, compile, and run Scala programs. Typically, this includes downloading the Scala SDK, which contains the compiler and essential libraries, and often using a build tool like sbt (Simple Build Tool) to…
Stage 3: Variables & Constants
Variables & Constants
Variables are named storage locations that hold data, and their values can be changed during the program's execution. In Scala, variables are declared using the var keyword. On the other hand, constants are also named storage locations, but their values cannot be modified once they are assigned. Constants are…
Integers
Integers are whole numbers, meaning they don't have any fractional or decimal parts. In Scala, integers can be positive (like 5), negative (like -10), or zero (0). They are used for counting and performing arithmetic calculations that involve only whole numbers. Scala provides several integer types, each with a…
Float
Floats in Scala are used to represent numbers with decimal points. They are like regular numbers but can have a fractional part, such as 3.14 or -2.7. A float uses 32 bits of memory and can store values with a certain level of precision. Because they are stored in binary format with a limited number of bits, they…
Strings
Strings represent sequences of characters. They're used to store and manipulate text. You create them by enclosing characters within double quotes, like "Hello, world!". Strings are immutable, meaning you can't change them directly; operations on strings produce new strings. Scala provides a rich set of methods for…
Booleans
Booleans represent truth values: either true or false. They are fundamental for decision-making in programs, allowing you to control the flow of execution based on conditions. You use booleans with logical operators like && (and), || (or), and ! (not) to create more complex expressions that evaluate to either true…
Unit
Unit is a data type in Scala that represents a placeholder when no meaningful value needs to be returned. It's similar to void in languages like Java or C. The unit type has only one possible value, written as (). You'll often see it used as the return type of functions that perform side effects but don't produce a…
Nothing
Nothing is a special type in Scala that sits at the bottom of the type hierarchy. It's a subtype of every other type, meaning it can be used anywhere any other type is expected. However, Nothing has no instances (no actual values), which essentially means that a function returning Nothing will never return…
IntelliJ IDEA
IntelliJ IDEA is a popular integrated development environment (IDE) that offers support for Scala through its Scala Plugin. This plugin provides essential features for Scala development, including code completion, refactoring, debugging, and seamless integration with build tools like sbt and Maven.
VS Code
Visual Studio Code (VS Code) is a popular IDE known for its lightweight design and extensive customization options. When equipped with the Metals extension, VS Code becomes a powerful tool for Scala development, offering features like code completion, refactoring, debugging, and integration with build tools like…
Stage 4: Operators
Operators
Operators are methods that can be used in a more readable and intuitive way. Scala supports standard arithmetic operators (+, -, \, /), relational operators (==, !=, , <, =, <=), and logical operators (&&, ||, !). Additionally, Scala has specific operators like the arrow (-) and fat arrow (=). The arrow operator…
Vim
Vim is a highly configurable text editor known for its efficiency and features. When equipped with the Metals plugin, Vim becomes a capable environment for Scala development, offering features like code completion, refactoring, and debugging.
Emacs
Emacs is a highly extensible and customizable text editor known for its features and flexibility. When equipped with the Metals plugin, Emacs becomes a robust environment for Scala development, offering features like code completion, refactoring, and debugging.
Zed
Zed is a modern, lightweight, and highly performant code editor designed for efficiency and ease of use. It offers features like real-time collaboration, a minimalistic interface, and editing capabilities. While Zed is not specifically designed for Scala development, its extensibility and support for various…
Sublime
Sublime Text is a sophisticated text editor known for its speed, ease of use, and features. It supports a wide range of programming languages, including Scala, through plugins and packages. Sublime Text offers features like multiple selections, a command palette, and extensive customization options, making it a…
Stage 5: Conditionals
Conditionals
Conditional statements are primarily handled using if/else and match/case constructs. The if/else construct is straightforward and similar to other programming languages, allowing for simple conditional branching. The match/case construct is more powerful and can handle multiple conditions, pattern matching, and…
Type Hierarchy
Generic types allow you to write code that can work with different types while maintaining type safety. Generic classes and traits take a type as a parameter within square brackets. For example, Stack\[A\] is a generic class that can be used to create stacks of any type A. Scala's type hierarchy is unified, with…
Type Parameters
Type parameters are used to create generic classes, traits, and methods. Type parameters are enclosed in square brackets and can be used to define methods and classes that work with different types while maintaining type safety.
Conversions
Implicit conversions allow the compiler to automatically convert one type to another in certain situations. In Scala 3, implicit conversions are defined by a given instance of type scala.Conversion\[S, T\], where S is the source type and T is the target type. In Scala 3.8+, the into keyword is used to mark types…
Stage 6: Data Structures
Data Structures
Scala provides three fundamental building blocks for structuring data and behavior: classes, traits, and objects. A class is a blueprint for creating objects, encapsulating data (fields) and behavior (methods). A trait is similar to an interface but can also contain concrete methods and fields, allowing for code…
Class
A class is a blueprint for creating objects. Classes can contain methods, values, variables, types, objects, and traits. The primary constructor is defined in the class signature. Classes are defined using the class keyword followed by the class name.
Trait
A trait is a type that defines a contract of fields and methods, which can be either abstract (unimplemented) or concrete (implemented). Traits are used to share behavior across classes, enabling code reuse without relying on single inheritance. Traits are similar to Java 8’s interfaces. Classes and objects can…
Object
The object keyword is used to create a singleton object. A singleton object is a class that has only one instance. Singleton objects are often used to define methods and values that are not specific to instances of a class, similar to static methods in Java.
Stage 7: Loops
Loops
Loops are used to execute a block of code repeatedly. Scala supports the following types of loops. while loop: Repeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body. for loop: Used to iterate over collections or ranges. It is often used for…
Stage 8: Try/Catch
Try/Catch
Exception handling is done using the try/catch/finally construct, similar to Java. The try block contains code that might throw an exception, the catch block handles the exception, and the finally block is used for cleanup or other operations that must be performed regardless of whether an exception was thrown.…
Stage 9: Working with Strings
Working with Strings
Scala offers various ways to manipulate strings, such as combining them (concatenation), finding their length, or extracting parts of them. String interpolation is a feature that lets you embed variables directly within strings, making it easier to build dynamic text. For example, you can use s"My name is $name"…
Array
An array is a fixed-size data structure that stores elements of the same data type. Arrays in Scala are mutable, meaning their elements can be updated. Arrays provide fast and constant-time access to elements based on their indices.
Range
A Range in Scala represents an ordered sequence of integers (or other numeric types) with a consistent step size. You define a range by specifying its start, end (inclusive or exclusive), and the increment between elements. Ranges are memory-efficient because they don't store all the numbers; instead, they…
Seq
A Seq in Scala represents an ordered collection of elements. Think of it like a list where the order in which you add items matters. You can access elements by their position (index), and Seq offers a variety of methods for manipulating the sequence, such as adding, removing, and searching for items. It's a…
List
Lists are ordered, immutable collections of elements of the same type. Once a list is created, you can't change its elements directly; instead, you create a new list with the desired modifications. They're useful for storing sequences of items where the order matters, like a to-do list or a series of events. Common…
Vector
Vectors in Scala are indexed, immutable sequences. Think of them as similar to arrays, but with the key advantage of being immutable – meaning their contents cannot be changed after creation. This makes them very useful in concurrent programming and for data structures where you want to guarantee that data isn't…
Set
A Set in Scala is a collection that holds unique elements. This means no duplicates are allowed. Sets are useful when you need to ensure that each item is only present once, like a group of unique user IDs or distinct product names. Scala provides both mutable and immutable Set implementations, allowing you to…
Map
A Map is a collection that holds key-value pairs. Think of it like a dictionary where each key is associated with a specific value. Keys are unique within a map, and you use a key to quickly retrieve its corresponding value. Maps are useful for storing and accessing data based on a unique identifier.
Mutable Collections
Mutable collections are used when you need collections that can be updated or extended in place, usually for better performance. After the computations are done, you can transform it to its immutable counterpart. Scala provides several mutable collection classes, including ArrayBuffer, ListBuffer, HashSet, and…
Functions & Methods
Functions and methods are fundamental building blocks for organizing and reusing code. A function is essentially a block of code that performs a specific task. You give it some input (arguments), and it returns an output (return value). A method is very similar to a function, but it's associated with an object or…
Method Calls
Method calls can be made using different syntaxes and conventions. Methods can be called using the standard dot notation (e.g., obj.method(params)) or using the infix notation (e.g., obj method params). Scala also allows the omission of parentheses on methods of arity-0 (no arguments), but this syntax should only…
Anonymous Func / Lambda
Anonymous functions, also known as lambdas, are functions without names. You define them inline where you need them, typically to pass them as arguments to other functions. They're essentially a concise way to represent small, single-expression functions. Scala uses a special syntax to define them, making it easy…
Total/Partial Funcs
A total function is a function that is defined for every possible input value it can be given. In contrast, a partial function is a function that is only defined for a subset of possible input values. Partial functions can be used with collection methods like collect and collectFirst to manipulate and transform…
Funcs returning Funcs
In Scala, functions can return other functions. Currying is the process of converting a function with multiple arguments into a sequence of functions that take one argument each. Function composition is the process of combining two or more functions to create a new function. Resources
find
The find method is used on collections (like Lists, Sets, or Maps) to locate the first element that satisfies a given condition. You provide find with a function that checks each element, and if the function returns true for an element, find immediately returns Some(element). If no element matches the condition, it…
filter
The filter method in Scala collections lets you pick out the elements you want based on a condition. You give it a function that takes an element and returns true if you want to keep it, and false if you want to discard it. The filter method then returns a new collection containing only the elements for which the…
foreach
The foreach method is used to apply a function to each element of a collection for its side effects. Unlike methods like map or filter, foreach does not return a value; it is used primarily for operations that have side effects, such as printing elements or modifying external state.
map
The map method is used to apply a function to each element of a collection and create a new collection with the same number of elements, where each element is the result of applying that function to the original element. Resources
flatMap
The flatMap method is used to apply a function to each element of a collection and then flatten the results into a new collection. It is essentially a combination of the map method followed by the flatten method, but this seemingly very simple property makes it fundamental for Functional Programming.
foldLeft
The foldLeft method is used to produce a single result by "folding" all the elements of a collection. The algorithm starts with a "zero" element which is paired with the first element of the collection to create an intermediate result element. Then that intermediate result is paired with the second element of the…
collect / collectFirst
The collect and collectFirst methods are used to apply a partial function to elements of a collection. The collect method takes a partial function as its parameter and applies it to all the elements in the collection to create a new collection. The new collection contains only those elements that were successfully…
Stage 10: Pattern Matching
Pattern Matching
Pattern matching is a way to check a value against a set of patterns. Think of it like a more powerful switch statement. You provide a value and then define different "cases" or patterns that the value might match. When a match is found, the code associated with that pattern is executed. It's often used to…
Case Classes
Case classes are a special type of class that is particularly useful for modeling immutable data. They provide several conveniences over regular classes, including immutability, several synthetic methods like toString, equals, and copy, as well as synthetic apply and unapply methods, which make case classes very…
Sealed Traits
Sealed traits are used to define closed hierarchies where all possible subclasses are known. They can be extended only in the same file as their declaration, allowing the compiler to perform exhaustiveness checking. This feature is particularly useful for pattern matching.
apply Method
The apply function is a so-called smart constructor. It's the most popular way in Scala to create new instances of data types. It's more flexible than a standard constructor because it allows for running certain logic before deciding whether an instance should be created, and, if yes, it can create an instance of a…
Enums
In Scala 3, enums are used to define a type consisting of a set of named values. They provide a more concise and safer way to define enumerations compared to the traditional Enumeration class in Scala 2.
Case Objects
Case objects are similar to regular Scala objects but with additional features that they share with case classes - immutable and with synthetic methods. They are often used for creating singleton objects and are particularly useful in pattern matching and message passing.
unapply Method
The unapply method is used to deconstruct instances through pattern matching. It is often used in extractor objects to extract data values compacted in objects. Resources
Regex
Regular expressions are supported through the Regex class in the scala.util.matching package. Regular expressions (regex) are patterns used to match character combinations in strings. They are useful for text processing, pattern matching, and data validation. Resources
Stage 11: Error Handling
Error Handling
Scala offers multiple ways to handle errors, including try/catch/finally blocks, Option, Either, and Try. These methods allow developers to handle exceptions and errors in a functional and composable way.
Option
The Option class in Scala is used to represent optional values. It is a carrier of single or no element for a stated type, and is particularly useful for handling cases where a value might be null.
Either
The Either class in Scala is used to represent a value of one of two possible types (a disjoint union). An instance of Either is either an instance of scala.util.Left or scala.util.Right.
Try
The Try class in Scala represents a computation that may fail during evaluation by raising an exception. It holds either a successfully computed value or the exception that was thrown.
for comprehension
For-comprehensions in Scala are used to evaluate expressions and return a sequence of values. They have the form for (enumerators) yield e, where enumerators refer to a list of enumerators. They are basically syntax sugar over flatMap but they help a lot in making your code both safe and.
Stage 12: Laziness
Laziness
Laziness is a feature that allows you to defer the evaluation of an expression until it is needed. This can be useful for optimizing performance and avoiding unnecessary computations.
Lazy vals
Lazy vals are used to defer the initialization of a variable until it is accessed for the first time. This can be useful for optimizing performance and avoiding unnecessary computations.
by-name Parameters
By-name parameters are defined using the = symbol before the parameter type. Such a parameter will be evaluated only when it is used inside the method's body. You can think of it as syntactic sugar over a zero-parameter function passed to a method.
Lazy Collections
Lazy collections are used to describe successive transformation operations without evaluating intermediate transformations. They are particularly useful for creating infinite collections without blowing the memory.
Stage 13: Scope & Visibility
Scope & Visibility
Scope and visibility in Scala determine where variables, methods, and classes can be accessed within your code. Scope defines the region of code where a variable is valid and accessible, while visibility controls whether a member (variable or method) of a class or object can be accessed from outside that class or…
private / protected
The private and protected keywords are used to control the visibility of members (variables and methods) in classes, objects, or packages. If no access modifier is specified, the default access level is public.
package
The package keyword is used to create namespaces that can contain entities such as classes, objects, and other packages. In Scala 2, package objects allow defining functions, variables, and types that are accessible to all members of a package. In Scala 3, it's possible to define all those elements at the…
Implicit Parameter
Implicit parameters are passed to functions without having to explicitly specify them at the call site. This can make your code more concise and readable, especially when dealing with common or boilerplate code. In Scala 2, they were declared with the implicit keyword. In Scala 3, we use keywords given and using.…
Stage 14: Recursion
Recursion
Recursion is a fundamental concept in computer science and mathematics where a function or process calls itself as part of its execution. This approach is particularly useful for tasks that can be defined in terms of similar subtasks, such as traversing tree structures, calculating factorials, or solving problems…
Tail Recursion
Tail recursion is a special form of recursion where the recursive call is the last operation in the function. This allows the Scala compiler to optimize the recursion to prevent stack overflow and improve performance.
Trampolines
Trampolines in Scala are used to avoid stack overflow errors in deep recursion by moving the computation from the stack to the heap. The TailRec class is part of the scala.util.control.TailCalls are used to implement trampolining.
Early returns
This topic brings together several concepts you have already encountered: pattern matching, partial functions, the apply and unapply methods, and lazy collections. Its purpose is to let you see how they work together.
Iterators
An iterator is a mechanism to access a collection's elements sequentially in a performant way. They are often used in loops. On the other hand, they are mutable, and careless use can lead to non-trivial bugs.
Views
Views are used to create lazy versions of collections. They are essentially reusable iterators that implement the same interfaces as regular collections.
LazyList
A lazy list is an immutable linked list that computes its elements only when they are needed. Elements are memoized, meaning the value of each element is computed at most once.
Stage 15: Build Tools
Build Tools
Build tools automate tasks like compiling code, running tests, and packaging applications. They streamline the development process and ensure consistency across projects. In the Scala ecosystem, popular build tools include scalacli, a newer option emphasizing simplicity and speed, sbt, a widely used and powerful…
Stage 16: Ecosystems
Ecosystems
Ecosystems in Scala are groups of frameworks and libraries that work well together and are often maintained and developed by the same organization. While nothing is stopping you from choosing any framework or library from the wide spectrum of Scala open-source projects, it often makes sense to stick to those that…
Cats
Cats provides core abstractions for functional programming in Scala. It aims to be modular, approachable, and efficient, while providing a foundation for an ecosystem of pure, typeful libraries. Cats Effect, a part of the Cats ecosystem, offers a pure asynchronous runtime for Scala, enabling developers to build…
ZIO
ZIO is a Scala framework designed for asynchronous and concurrent programming. It emphasizes type safety, composability, and resource safety, making it suitable for building scalable and resilient applications. The ZIO ecosystem includes libraries for HTTP, logging, configuration, streams, and testing, all built on…
Li Haoyi
The Li Haoyi ecosystem is centered around making Scala easy to use and productive. It includes libraries like Ammonite REPL, Mill Build Tool, os-lib, uPickle, Cask, and Scalatags. This ecosystem emphasizes executable pseudocode, ease of use, and productivity. It is designed to allow developers to write Scala in a…
Akka / Pekko
Akka and Pekko are toolkits for building concurrent, distributed, and resilient applications on the JVM using Scala. Akka, originally developed by Lightbend, introduced an actor model for managing concurrency, inspired by Erlang. It provides abstractions for building scalable and fault-tolerant systems. Pekko is an…
No Ecosystem
The Scala open-source landscape outside of the major ecosystems often focuses on niche use cases or innovative ideas that may not be covered by the larger frameworks. Projects in this space can range from specialized tools for data science, machine learning, and web development to unique solutions for testing,…
ScalaCLI
ScalaCLI is a command-line tool designed to simplify the process of learning and using Scala. It is optimized for speed and ease of use, making it ideal for scripts, playgrounds, and single-module projects. ScalaCLI manages its own dependencies and supports features like incremental compilation and dependency…
sbt
sbt (Scala Build Tool) is a build tool designed for Scala and Java projects. It allows developers to define tasks in Scala and run them in parallel from an interactive shell. sbt is known for its incremental compilation feature, which updates only the parts of the project that have changed, saving time and…
Mill
Mill is a build tool designed for Java, Scala, and Kotlin projects. It focuses on speed and efficiency by automatically caching and parallelizing build tasks and tests. Mill uses a long-lived daemon to keep the JVM warm, which helps in maintaining fast build times. It also supports selective test execution to…
Stage 17: Platforms
Platforms
A platform is a runtime environment in which code is compiled and executed. Scala is primarily known as a JVM language, alongside Java and Kotlin. Scala code is compiled into the same bytecode as these languages and runs in the Java Runtime Environment (JRE), which provides independence from specific machine…
JVM
Scala's primary platform is the Java Virtual Machine (JVM). Scala code is compiled into Java bytecode, allowing it to run on any device with a JVM, independent of the underlying machine configuration. This setup ensures compatibility with Java libraries and tools, making Scala a versatile choice for developers…
Scala Native
Scala Native is an optimizing ahead-of-time compiler and lightweight managed runtime designed specifically for Scala. By leveraging LLVM, Scala Native compiles Scala code directly to native executables, eliminating the need for a Java Virtual Machine (JVM). This results in faster startup times and smaller memory…
Scala.js
Scala.js is a Scala compiler that compiles Scala code to JavaScript, enabling Scala programs to run in web browsers or Node.js. It optimizes Scala code into highly efficient JavaScript, ensuring fast turnaround times with incremental compilation. Scala.js provides strong typing, which catches typos and type errors…
Gradle
Gradle is widely used for building, testing, publishing, and deploying software packages. It is known for its flexibility and efficiency in managing dependencies and resolving version conflicts. Gradle uses a Groovy-based Domain Specific Language (DSL) for writing build scripts, making it more flexible and readable…
Maven
Maven is a build automation and dependency management tool primarily used for Java projects. It simplifies the build process by using a Project Object Model (POM) file, typically named pom.xml, which centralizes project configuration and manages dependencies. Maven follows best practices and conventions to ensure…
Stage 18: Referencial Transparency
Referencial Transparency
Referential transparency is a fundamental concept in functional programming where an expression can be replaced by its value without changing the behavior of the program. In Scala, this concept is closely tied to pure functions, which always return the same output for the same input and do not have any side effects.
Pure Functions
Pure functions in Scala are functions that always return the same output for the same input and do not have any side effects. They are fundamental to functional programming and provide predictability and reliability.
Stage 19: Monads
Monads
Monads in Scala are constructs that augment a value with additional features, known as effects. These effects can include managing the nullability of a variable or handling the asynchronicity of its computation. In Scala, common monads include Option\[T\], Future\[T\], Either, List, and more. A monad adds an effect…
Category Theory
Category Theory is a branch of mathematics that deals with structures and relationships between them. In the context of Scala and functional programming, Category Theory provides a framework for understanding and designing functional programs. Key concepts include categories, functors, monads, and natural…
Stage 20: Capabilities
Capabilities
Scala 3 introduces a new feature called "capabilities" as an alternative way to model effects. In short, a capability is an implicit function passed as a parameter. The function that requires a capability as a parameter declares in this way, that it will only work if in its scope is a capability to perform a…
Capture Checking
Capture Checking is an experimental feature in Scala that allows you to track which designated values are captured (i.e., stored as references) by arbitrary other values. This tracking happens at compile time and is currently an opt-in mechanism that can be enabled via an import. Capture checking helps ensure…
Stage 21: Typeclasses
Typeclasses
Typeclasses are a concept used in functional programming to achieve ad-hoc polymorphism. They define a set of functions that can be implemented for a type fulfilling certain requirements, providing a way to add functionality to existing types without modifying their source code. Typeclasses are not natively…
Stage 22: Type System
Type System
The Scala type system supports both object-oriented and functional programming paradigms. It is designed to be expressive and flexible, allowing developers to write concise and type-safe code. The type system includes features such as type inference, generics, variance annotations, type bounds, abstract types,…
Variance
Context Bounds in Scala is a feature that provides a shorthand syntax for expressing the common pattern of a context parameter that depends on a type parameter. Context bounds are used to simplify the code for generic types and are particularly useful in the context of type classes.
Context Bounds
Context Bounds in Scala is a feature that provides a shorthand syntax for expressing the common pattern of a context parameter that depends on a type parameter. Context bounds are used to simplify the code for generic types and are particularly useful in the context of type classes.
Stage 23: Macros
Macros
Macros enable advanced metaprogramming capabilities, such as code generation, optimizations, and the creation of domain-specific languages (DSLs). Scala 3 macros were redesigned to be more intuitive and flexible than the previous version.
Stage 24: Testing
Testing
Testing is the process of checking if a piece of software works as expected. It involves running the software with different inputs and conditions to find any errors, bugs, or unexpected behavior. The goal is to make sure the software is reliable, stable, and meets the requirements it was designed for.
ScalaTest
ScalaTest is a flexible and comprehensive testing framework for Scala. It integrates with various tools like JUnit, TestNG, Ant, Maven, sbt, ScalaCheck, and mocking frameworks such as Mockito and ScalaMock. ScalaTest allows you to choose from multiple testing styles, such as FlatSpec, FunSuite, and FunSpec, to fit…
JUnit
JUnit is a popular open-source unit testing framework for Java. It is part of the xUnit family and is designed to help developers write and run repeatable tests. JUnit is widely used for unit testing and supports various types of tests, including integration tests. It is trusted by millions of developers worldwide…
mUnit
MUnit is a Scala testing library that offers actionable errors and extensible APIs. It is designed to provide clear and helpful error messages when tests fail, making it easier to debug and fix issues. MUnit allows you to run test suites directly from your IDE, whether it's IntelliJ, VS Code, or any other LSP editor.
uTest
uTest is a simple and convenient testing library for Scala. It provides essential features in their minimal form, avoiding unnecessary complexity. uTest allows you to organize tests in a hierarchical structure and run them at various levels, from individual tests to entire suites. It is designed to be…
ZIO Test
ZIO Test is a testing library for Scala that makes it easy to test effectual programs. It is tightly integrated with ZIO, allowing tests to be treated as immutable values, which simplifies testing asynchronous and concurrent code. ZIO Test provides features like resource management, property-based testing, and…
specs2
specs2 is a library for writing executable software specifications in Scala. It allows you to write specifications for individual classes (unit specifications) or entire systems (acceptance specifications). specs2 is designed to work with SBT and integrates with various testing styles and frameworks.
Stage 25: Backend
Backend
Backend software development in the context of programming in Scala involves creating and maintaining the server-side components of applications that handle business logic, data processing, and communication with databases or other services. Frameworks like Akka, Play, and http4s are commonly used in the Scala…
sttp
sttp is an open-source HTTP client for Scala that provides a clean, programmer-friendly API to describe HTTP requests and handle responses. It supports various approaches to writing Scala code, including synchronous (direct-style), Future-based, and functional effect systems like cats-effect, ZIO, Monix, Kyo, and…
Scalatra
Scalatra is a lightweight, Sinatra-like web framework for Scala. It is designed to be simple, accessible, and easy to use, making it a practical way to learn Scala and build high-performance websites and APIs.
Play
The Play Framework is an open-source web application framework that follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM bytecode, such as Java. Play is designed to optimize developer productivity by providing a…
Tapir
Tapir is a library to describe HTTP APIs, expose them as a server, consume as a client, and automatically document using open standards. It is designed to be fast and developer-friendly, with a focus on type-safety, readability, and discoverability. Tapir provides integrations with many libraries in the Scala…
AkkaHTTP
Akka HTTP is a modern, fast, asynchronous, and streaming-first HTTP server and client. It implements a full server- and client-side HTTP stack on top of akka-actor and akka-stream. Akka HTTP is not a web framework but rather a toolkit for providing and consuming HTTP-based services. It offers a flexible “Routing…
http4s
bb http4s is a minimal, idiomatic Scala interface for HTTP services. It is built on FS2, a streaming library that allows for processing and emitting large payloads in constant space and implementing websockets. http4s is designed to be composable and easy to reason about, with I/O managed through cats-effect.
ScalaTest
ScalaTest is a versatile testing framework for Scala that helps programmers write both integration and performance tests. For integration testing, ScalaTest allows you to test the interactions between different components of your application, such as APIs, databases, or services, ensuring they work together as…
Gatling
Gatling is an open-source tool for performance and load testing, particularly well-suited for testing web applications. It is built on Scala, Akka, and Netty, and allows you to write test scenarios using expressive SDKs in Scala, Java, Kotlin, JavaScript, or TypeScript. Gatling is designed to be high-performance…
Stage 26: Effect Systems
Effect Systems
An effect system is a programming paradigm that helps manage side effects in a controlled and predictable manner. In functional programming, side effects - such as input/output operations, state changes, or exceptions - can introduce complexity and make code harder to reason about. An effect system allows…
Cats Effect
Cats Effect is a high-performance, asynchronous, composable framework for building real-world applications in a purely functional style within the Typelevel ecosystem. It provides a concrete tool, known as "the IO monad," for capturing and controlling actions, often referred to as "effects," that your program…
ZIO
ZIO is a Scala framework for asynchronous and concurrent programming. It is designed to be type-safe, composable, and highly scalable, allowing developers to build safe applications. ZIO provides a comprehensive set of tools for managing resources, handling concurrency, and ensuring program safety. It leverages the…
Stage 27: GUI
GUI
GUI frameworks and libraries provide tools and components for creating graphical user interfaces in applications. These tools handle the visual elements like windows, buttons, text fields, and other interactive elements, along with event handling to make applications responsive to user actions. They allow…
Laminar
Laminar is a UI library for Scala.js that focuses on simplicity, expressiveness, and safety. It allows developers to build web application interfaces while keeping the UI state in sync with the underlying application state.
Calico
Calico is a pure, reactive UI library for Scala.js. It enables developers to build reactive web applications using Scala.js, integrating with libraries such as Cats Effect and FS2.
Slinky
Slinky is a framework for writing React apps in Scala, providing an experience similar to using ES6. It allows developers to leverage Scala's type safety and functional programming features while building React applications. Slinky supports React DOM, React Native, and other React-based platforms.
Stage 28: Concurrency
Concurrency
Next to backend software development, concurrent programming is the other niche where Scala shines. Scala offers a number of solutions from all over the board: effect systems, actors, and so-called direct style.
Ox
Ox is a Scala library designed for safe direct-style streaming, concurrency, and resiliency on the JVM. It offers a comprehensive set of tools for managing concurrency, error handling, and resource management in a developer-friendly manner. Ox leverages Scala 3 and JDK 21+ to provide structured concurrency,…
Gears
Gears is an experimental asynchronous programming library for Scala 3. It is designed to enable direct-style programming, structured concurrency, and is cross-platform, working on both JVM =21 and Scala Native. Gears provides a simple and structured way to handle concurrent programming, minimizing computation leaks…
FS2
FS2 is a library for purely functional, effectful, and polymorphic stream processing in the Scala programming language. Its design goals are compositionality, expressiveness, resource safety, and speed. FS2 is built upon Cats and Cats-Effect, and its core types (streams and pulls) are polymorphic in the effect…
Kyo
Kyo is a toolkit for Scala development, providing a rich standard library for development across Native, JVM, and JavaScript platforms. It introduces a novel approach based on algebraic effects to deliver straightforward APIs in the pure Functional Programming paradigm.
React.js
React.js is a popular JavaScript library for building user interfaces, developed and maintained by Facebook. It can be integrated with Scala.js, allowing developers to write React applications using Scala.
Stage 29: Distributed Computing
Distributed Computing
Distributed computing involves creating systems where multiple computers work together to solve complex problems by sharing resources and processing tasks across a network. Scala is particularly well-suited for distributed computing due to its ecosystem of libraries and frameworks like Akka, Apache Spark, and ZIO,…
Spark
Apache Spark is a framework for big data processing that integrates seamlessly with Scala. It provides a unified engine for various data processing tasks, including batch processing, interactive queries, streaming, machine learning, and graph processing.
Akka
Akka is a suite of modules designed for building scalable, resilient, and distributed systems using the actor model. It simplifies concurrency and fault tolerance by providing a framework for handling asynchronous operations and message passing. Akka is particularly well-suited for developing systems that require…
ScalaFX
ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX. Every ScalaFX application is also a valid Scala application. It supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX are supported. ScalaFX uses a simple, hierarchical pattern for…
JavaFX
JavaFX is a GUI toolkit for Java designed to create rich desktop applications with modern user interfaces. It provides a comprehensive set of UI controls, supports hardware-accelerated graphics, and can be used to build applications that run across multiple platforms, including web, desktop, and mobile. JavaFX is…
Akka & Peko Streams
Akka Streams, now succeeded by Pekko Streams, provide a powerful way to handle streams of data reactively and efficiently. These libraries offer tools to define data processing pipelines with backpressure, ensuring that data flows smoothly between components without overwhelming any part of the system. Think of it…
ZIO Streams
ZIO Streams is a purely functional streaming library that uses the ZIO runtime. It is designed for working with large or infinite data, providing automatic backpressure handling, non-blocking and asynchronous processing, and a rich set of stream combinators. ZIO Streams ensures resource safety and efficient…
scala-android-plugin
The Scala Android Plugin is a tool that allows developers to build Android applications using the Scala programming language. It integrates with the Android build system, enabling you to write your application logic, activities, and UI components in Scala, and then compile them into Dalvik bytecode that can run on…
Scala on Android
This is a repo for examples, small tutorials, and some chaotic notes on how to write Android apps with GraalVM, Gluon Mobile, JavaFX, and Scala.
Stage 30: Data Handling
Data Handling
Data handling involves the processes of gathering, storing, and manipulating data for various purposes. It encompasses activities like reading data from different sources, transforming it into a usable format, and performing operations to analyze or modify it. Efficient data handling is essential for building…
GraalVM Native Image
GraalVM Native Image is a tool that compiles Java applications into native binary executables using ahead-of-time (AOT) compilation. When used with Scala, it can significantly improve the performance and startup time of Scala applications by eliminating the need for a JVM at runtime. The process involves using…
Pekko
Pekko is an open-source framework for building applications that are concurrent, distributed, resilient, and elastic. It uses the Actor Model to provide intuitive high-level abstractions for concurrency. Pekko is a fork of Akka 2.6.x and offers libraries for persistence, streams, HTTP, and more.
Stage 31: Video game Engines
Video game Engines
The video game development landscape is ruled mainly by C++, but there is a small but active scene of games developed in JVM languages - for example, Minecraft was coded in Java. Scala's interoperability with Java makes it possible to develop video games using Java solutions, like LibGDX and LWJGL, but there are…
Indigo
Indigo is a game engine written in Scala, designed specifically for functional programmers. It aims to address challenges in testing games and managing data flow and state. Indigo supports Scala 3.0 and is particularly suited for developing 2D pixel art games.
CosPlay
CosPlay is a 2D ASCII game engine for Scala. It is designed to be a standard Scala3-based program with minimal requirements for code organization. CosPlay allows for the creation of games using ASCII characters and provides methods to initialize the game engine, start the game loop, and dispose of the game engine…
LibGDX w/ Scala
LibGDX is a popular JVM framework for game design that can be used with Scala. It provides a set of tools for creating cross-platform games. Scala developers can use LibGDX with build tools like sbt or Gradle to manage their projects. LibGDX supports various features such as graphics, sound, physics emulation, and…
Doobie
Doobie is a pure functional JDBC layer for Scala and Cats. It provides a functional way to construct programs and higher-level libraries that use JDBC. Doobie is designed to be type-safe and composable, allowing developers to write database interactions in a purely functional style.
ScalikeJDBC
ScalikeJDBC is a tidy SQL-based database access library for Scala developers. It naturally wraps JDBC APIs and provides easy-to-use APIs, making it intuitive and highly flexible. ScalikeJDBC is designed to be practical and production-ready, offering features like QueryDSL for type-safe and reusable code.
Quill
Quill is a library for database access in Scala that provides a Quoted Domain Specific Language (QDSL) to express queries in Scala and execute them in a target language. It supports compile-time query generation and validation, making it easier to write type-safe and efficient database queries. Quill is designed to…
Slick
Slick is a Functional Relational Mapping (FRM) library for Scala that allows developers to query and access databases in a manner similar to working with Scala collections. It provides compile-time safety and composability, making it easier to write and maintain database queries. Slick supports various databases…
Stage 32: Macros & the Type System
Macros & the Type System
Macros are pieces of code that transform other code at compile time. They allow you to perform computations and generate code based on the structure of your program, enabling powerful metaprogramming capabilities. The type system, on the other hand, is a set of rules that govern how data types are used in a…
Monocle
Monocle is an optics library for Scala and Scala.js, strongly inspired by Haskell Lens. It provides functionalities for creating and manipulating lenses, prisms, and isomorphisms. Monocle uses macros to simplify the generation of optics, such as lenses for case classes, prisms for subclasses, and isomorphisms…
Chimney
Chimney is a Scala library that provides typeclasses and macros for intuitive and type-safe transformations between data structures. It allows for automatic derivation of transformers between different model case classes, reducing boilerplate code. Chimney uses macros internally to ensure that transformations are…
Shapeless
Shapeless is a library for type-level programming in Scala, providing functionalities for generic programming using type classes and macros. It allows for type-safe manipulation and transformation of data structures at compile time, leveraging Scala's type system. Shapeless is known for its use of HLists…
Magnolia
Magnolia is a generic macro for automatic materialization of typeclasses for datatypes composed from case classes (products) and sealed traits (coproducts). It supports recursively-defined datatypes out-of-the-box and incurs no significant time penalty during compilation. Magnolia provides a simple interface for…
Scalameta
Scalameta is a metaprogramming tool for Scala that provides high-quality syntactic and semantic analysis and code generation. It was widely used in Scala 2 for advanced metaprogramming scenarios and continues to be relevant in Scala 3. Scalameta operates at the meta level, taking programs as input and producing…
PlayJSON
PlayJSON is a Scala JSON library originally developed for use with Play Framework. It uses Jackson for JSON parsing and offers features like custom validation while parsing and automatic parsing of JSON in request bodies.
Circe
Circe is a JSON library for Scala that is part of the Cats ecosystem. It provides a functional way to handle JSON data, including encoding and decoding using Encoder and Decoder type classes. Circe aims to simplify working with JSON by hiding implementation details in a simple API and offers good performance and…
Jsoniter
Jsoniter is a library for compile-time generation of safe and ultra-fast JSON codecs for Scala. It uses Scala macros to generate codecs and has its own core mechanics for parsing and serialization. Jsoniter is designed to provide high performance and efficient processing of JSON data, making it suitable for…
uPickle
uPickle is a simple, fast, and dependency-free JSON serialization library for Scala. It is designed to handle statically-typed, tree-shaped, immutable data structures efficiently. uPickle is part of the Scala Toolkit and integrates well with other Scala libraries.
Questions about the Scala Roadmap
Is the Scala Roadmap free?
Yes. All 165 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.
How long does the Scala Roadmap take?
There is no fixed duration. It has 165 lessons in 32 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.
Where should I start the Scala Roadmap?
Start with stage 1, Introduction, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Introduction you can go straight to Setting Up Scala or anything after it. Each lesson links to free resources for going deeper.
Can I learn Scala in Hindi?
The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.