Abstract
Frustrated that `const generics` can't do math yet? Want to make some structure change layout based on the size of its generic parameters? Curious about how you can make lists, loops, ternaries and branches without declaring a single function? Tried to understand how `stabby` builds a stable representation for your enums and came home with a headache?
In this talk, you will learn how to make the type system do math, how to use Generic Associated Types (GATs) to do so without reaching where-clause hell, and how to have that math influence your types’ layouts.
I'll take you through stabby's secret sauce that made it the first stable ABI available in Rust to provide niche optimizations: abusing the trait system for fun and profit.
I'll teach you the ways of computation by GATs, its limits and how to play around them, and just how cursed things can get when you give a Turing complete type system to someone who listens to talks about category theory for fun. This talk will start with some context and background concepts, and continue with a more concrete code-oriented session.