Rust Enums: Algebraic Data Types
Algebraic data types (ADTs) come from type theory and functional programming, but Rust brings them to systems programming with zero runtime overhead. Unlike C-style enums that are glorified integers,…
Read more →Algebraic data types (ADTs) come from type theory and functional programming, but Rust brings them to systems programming with zero runtime overhead. Unlike C-style enums that are glorified integers,…
Read more →The term ‘algebraic’ isn’t marketing fluff—it’s literal. Types form an algebra where you can count the number of possible values (cardinality) and combine types using operations analogous to…
Read more →