Type-Level Programming
This section covers treating types as compile-time transformations while managing complexity limits. Every lesson stands alone while fitting the beginner-to-staff progression.
Learning outcomes
- Explain runtime and compile-time responsibilities.
- Write a correct example without unsafe escape hatches.
- Diagnose a representative compiler error.
- Identify API, performance, security, and production trade-offs.
- Apply the concept in a project or interview.
Lessons
- Types as Programs
- Type-Level Inputs and Outputs
- Recursion
- Accumulator Patterns
- Tuple Recursion
- String Recursion
- Union Distribution
- Union to Intersection
- Union to Tuple
- Recursion Limits
- Instantiation Depth
- Compiler Performance
- Readable Type-Level Code
Study method
Run the examples under strict checking, intentionally introduce an error, explain the diagnostic, and finish the exercises.