Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Programming Language History & Theory
·
Module 6
Algebraic Data Types and Pattern Matching
1
Product Types: From ML to Modern Languages
Define product types using records or tuples, tracing their formalization from the ML language family.
2
Sum Types: From ML to Rust and Swift
Define sum types using variants or tagged unions, from their origins in ML through modern implementations in Rust and Swift.
3
Pattern Matching: ML vs. Python
Use pattern matching for control flow and data extraction, comparing ML-style matching with Python's recent structural pattern matching.
4
Type-Safe Expression Evaluators with ADTs
Model a type-safe expression evaluator using algebraic data types, demonstrating a central design pattern of functional languages.
5
Sum Types: Eliminating Null Reference Errors
Explain how sum types (e.g., Option/Maybe) improve type safety by eliminating null reference errors.
6
Algebraic Data Types vs. Class Hierarchies: The Expression Problem
Compare algebraic data types with class hierarchies for modeling data, introducing the Expression Problem as a key design challenge.
Previous module
Polymorphism and Generic Programming
Next module
Evaluation Strategies and Laziness