News for hackers. Stuff that matters.
Re:State Machines II by jcelerier on Monday August 29, 2022 @03:49AM (#32635678)
> IMO a state machine should be define first in a list of valid state transitions.

I once did this for a project and I really regretted it, when the state machine grew to ~15 states with maybe 80% of the complete graph in terms of transitions, it became extremely hard to read and follow as one would need to jump back and forth all over the place in the code

Re:State Machines II by baby on Monday August 29, 2022 @04:56PM (#32643445)
If your list of allowed transition is in a single place how is it making your logic harder to understand vs easier?