3 ms·
State machines are excellent, but this comes up every so often on HN and I've come to respect the observation that state machines become very difficult to chang
by headbiznatch 15y ago
State machines are excellent, but this comes up every so often on HN and I've come to respect the observation that state machines become very difficult to change.
They particularly rock for games, where the universe is unlikely to suddenly add new interactions or change fundamental laws, but in an evolving business application with requirements that perpetually jag, they can be a source of great pain.
EDIT: After thinking about this a bit more, I realize the state machine use is in reference to an API, which probably should be approached with a certain sense of immutability. I still think that in general, using them outside of games should be approached with serious fore-thought to the potential for change in your requirements.