Building a Typechecker from scratch
Learn type checking and inference fundamentals. Understand how to ensure code correctness and improve program reliability. Essential for developers!
Course Content
Building a Typechecker from scratch is an intermediate-level Udemy course taught by Dmitry Soshnikov. It runs 2h 15m, is taught in English, and includes a certificate of completion. Learners rate it 4.8 out of 5 from 30 reviews, with 266 students enrolled. It is a paid course, first published July 2022.
Unlock the Secrets of Type Checking: Build a Typechecker from Scratch
Are you fascinated by how programming languages ensure code safety and simplify development? Dive into the world of type theory and type checking with this hands-on course. Learn to build a functional typechecker, similar to those found in languages like TypeScript and Java, from the ground up.
What You'll Learn:
- Understanding Type Systems: Explore static typing vs. weak typing, type inference, and type judgments. Grasp the core concepts behind how languages verify code correctness.
- Practical Implementation: Go beyond theory and build a working typechecker in JavaScript. The code is designed to be portable, allowing you to adapt it to TypeScript, Rust, OCaml, C++, Python, and more.
- Data Structures & Algorithms: Strengthen your engineering skills by tackling the data structures and algorithms involved in building a sophisticated type system.
- End-to-End Development: Follow a structured, step-by-step approach, with live coding sessions and practical assignments. You'll implement every detail of the typechecker yourself, not just copy-paste solutions.
- Modern Language Concepts: Delve into functional programming concepts like functions, closures, recursion, and anonymous functions.
- Type Declarations & OOP: Learn to define new types using type aliases and implement object-oriented programming (OOP) constructs within your type system.
- Generic Programming: Master generic functions and union types to create reusable and flexible code.
Who is this course for?
This course is ideal for:
- Engineers eager to build complex systems and gain transferable knowledge.
- Developers interested in compilers, programming language design (PL), and type theory.
- Anyone wanting to understand how typecheckers work under the hood.
- Those seeking to enhance their engineering skillset with a deep understanding of language internals.
Course Structure:
The course is divided into four parts (20+ lectures) covering:
- Part 1: Type Theory and Basic Types: Foundations of type checking, type inference, and building the core components of your typechecker (variables, typing environment, parser).
- Part 2: Functional Programming: Implementing various function types, including user-defined, built-in, inner functions, closures, and recursive functions.
- Part 3: Type Declarations and Classes: Defining new types with type aliases and implementing OOP classes.
- Part 4: Generic Programming: Exploring union types and implementing generic functions for code reusability.
Prerequisites:
A basic understanding of how programming languages work (eval, closures, scope chains, environments) is recommended. The "Building an Interpreter from Scratch" course is a valuable optional prerequisite.
Why JavaScript?
We use JavaScript for its accessibility and portability. You'll gain a deep understanding of the concepts, regardless of your preferred language. The code is designed to be easily adapted to other languages.
Get ready to build your own powerful typechecker and elevate your programming skills!
Need a web app built? Hire the team behind TutorialSearch.io
We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.