|
|
|
|
|
by coldtea
3039 days ago
|
|
>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. |
|