typed finite-state machine
Advantages of type-fsm
Focus on the right message
Top-to-bottom design for easy refactoring
Conducive to building complex state machine systems
There is a sanity check. If you miss some items for pattern matching, the compiler will issue a warning, and there will also be a warning for invalid items.