▲ | gpderetta 2 hours ago | |
In fact state machines are great for documentation even if the code is not explicitly written as a state machine! | ||
▲ | _huayra_ an hour ago | parent [-] | |
Yes, and it's much better than having a dozen or more `bool` values that indicate some event occurred and put it into some "mode" (e.g. "unhealthy", "input exhausted", etc) and you have to infer what the "hidden state machine is" based on all of those bool values. Want to add another "bool state"? Hello exponential growth... |