Remix.run Logo
lelanthran 9 hours ago

> Imagine you have an informally-specified, undocumented, at-least-somewhat-incomplete state machine. Imagine that it interacts with several other similar state machines. Still easy to reason about?

You think that developers that wrote an informally-specified, undocumented, at-least-somewhat-incomplete state-machine would have written that logic as a non-state-machine in a formally-specified, documented and at-least-somewhat-complete codebase?

State-machines are exceptionally easy to reason about because you can at least reverse-engineer a state-diagram from the state-machine code.

Almost-a-state-machine-but-not-quite are exceptionally difficult to reason about because you can not easily reverse-engineer the state-diagram from the state-machine code.

gpderetta 34 minutes ago | parent [-]

In fact state machines are great for documentation even if the code is not explicitly written as a state machine!