|
|
|
|
|
by jupp0r
1099 days ago
|
|
Nice job. In my own usage of state machine libraries over the years I have found that for complex use cases, it's definitely helpful to have event-based transition dispatching be part of the library. The great benefit of FSMs is that you can express in data a lot of aspects that you would normally express in code. Not knowing what event needs to happen to transition to one state vs another leaves out a lot of the benefits that you get from designing your code around FSMs. That being said, I appreciate the simplicity and it's a totally fine choice to leave out event based dispatch for less complex use cases! One thing that has been mentioned here already: it's super helpful to have your library output a diagram file to visualize the FSM. This is a really great way to keep code and documentation in sync always. |
|
Re the visualization, I think that would be cool. I might give that a shot.