News for hackers. Stuff that matters.
Re:Why Developers Never Use State Machines (2011) by coldtea on Tuesday February 27, 2018 @03:54AM (#16472036)
>I really don't like state machines because if you need to add a new event, each of the states need to be updated to handle that event. If you add a new state, you have to figure out how to handle each of the transitions from other states. So as your states grow, the maintenance on the developer's side grows faster than linear.

State machines have been designed to neatly capture and componentize exactly that.

Anything else is less explicit, and even more error prone.

That new even and those new transitions you've mentioned? You still need to handle them anyway -- only you do it in an informal manner without a SM.

There are no comments on this comment yet.