News for hackers. Stuff that matters.
Re:State Machines by pierrebouchet on Tuesday May 15, 2012 @05:56AM (#3975768)
There is also the HSM (hierarchical state machine) extension of this concept (by the same author, not sure it's in the same book) where a given state either handles an event or returns a pointer to a "superstate" that handles it. This kind of "behavioral inheritance" allows for a much more compact code.

Compact and efficient state machines are immensely useful when working with small microcontrollers that don't even run an OS.

Re:State Machines by nickmain on Tuesday May 15, 2012 @12:15PM (#3977246)
The other nice thing about HSMs are concurrent sub-states. They allow clean modeling of the orthogonal aspects of the state.