Re:State Machines
by perlgeek on Tuesday May 15, 2012 @06:20AM
(#3975842)
There's a lot of code that doesn't benefit from state machines at all.
But when code does profit from a state machine, it's often easy to recognize from the many 'if' statements that check several flags (like ' if (seen_input && !eof && ..)')
But when code does profit from a state machine, it's often easy to recognize from the many 'if' statements that check several flags (like ' if (seen_input && !eof && ..)')