Re:State Machine in Real Life
by jgwil2 on Sunday May 03, 2020 @12:26AM
(#23056856)
Insert new cases or change order without affecting behavior and statically check that all cases are covered. Unlike a switch statement or if else block where each condition is checked in order so adding more cases gets difficult.
[ Parent
| on HN ]
All Rust match statements as statically checked that all cases are covered by the compiler; you can't really turn that of even with unsafe blocks.
How are you expecting that inserting or adding statements would change behavior?