rust
Exhaustiveness checking in Rust, Java, PHPStan
Intro: Simple enums and exhaustiveness checking in PHPStan If you use enums (enum = enumeration of all possible states) then you can perform exhaustiveness checking. Before we proceed to Rust and Java, I am using PHP with PHPStan to give a quick introduction to the concepts at hand. enum GraphicsPreset { case