Skip to main content

Pattern-Matching

Syntax and Semantics 2: Three ways to define what your code means

·7 mins
Your match expression is operational semantics. Your pure function is denotational semantics. Rust’s borrow checker is axiomatic semantics. Three formal frameworks, three ways to assign meaning to code, and you have been using all of them without knowing it.