Yes it’s mine but that’s kind beside the point since FSM have been invented long time ago as methodology to build nontrivial maintainable asynchronous systems and data driven approach as best engineering approach to them. I understand the initial simplicity of couple case statements but frankly giving someone something like this as interview question and failing people when they don’t implement FSMs over data driven approach is what we use in systems companies often.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A much more maintainable approach is using
crates.io/crates/extfsm
This will generate the picture out your code FSM for you BTW ...
Ah yes Tony, that crate is awesome (BTW congrats since it's yours :)).
Generally, though, I tend to use bare-bones Rust in posts if possible as it poses less cognitive strain.
Yes it’s mine but that’s kind beside the point since FSM have been invented long time ago as methodology to build nontrivial maintainable asynchronous systems and data driven approach as best engineering approach to them. I understand the initial simplicity of couple case statements but frankly giving someone something like this as interview question and failing people when they don’t implement FSMs over data driven approach is what we use in systems companies often.