Code and materials for my advanced book Pragmatic Type Level Design
Pragmatic Type-Level Design is a deep book that explores practical concepts of type-level design in various statically typed functional and object-oriented languages, especially Haskell, F#, OCaml, Rust, C++, and Scala.
Unlike most resources that focus on the mathematical underpinnings of type-level programming, this book's primary emphasis lies in pragmatism: it explores the practical application of these concepts in actual programming scenarios. It formulates best practices, examines how types influence application design and architecture, and outlines principles for managing the inherent complexity in type-level code.
Haskell is a model language, but the book contains the Rosetta Stone part with the ideas translated into Scala 3 and Rust.
Topics:
🟤 type-level domain modeling
🔵 type-level domain-specific languages (eDSLs)
🟣 type-level correctness verification
🟡 extensibility and genericity approaches
🟠 type-level interfaces (my own concept)
🔴 application architectures and type-level design patterns
🟢 design principles such as SOLID, make invalid states unrepresentable, dumb but uniform
⚪️ a whole methodology called Pragmatic Type-Level Design
Pragmatic Type-Level Design best works in pair with Functional Design and Architecture (early self-published edition, and a new one with Manning Publications). FDaA is a fundamental book on software design in functional languages.
Both FDaA and PTLD provide a consistent, pragmatic, and structured set of knowledge never seen before in the functional world.
Buy both and learn a lot of great ideas presented in an academism-free, mature style. You'll likely won't find anything better than my books anywhere else in the field.