3 ms·
State machines sounds great in theory, but, and maybe I am unlucky, but often code that starts out as a nice state machine ends up degenerating into spaghetti c
by RcouF1uZ4gsC 4y ago
State machines sounds great in theory, but, and maybe I am unlucky, but often code that starts out as a nice state machine ends up degenerating into spaghetti code.
- bigDinosaur 4y agoI agree, my experience is that state machines are great except the ergonomics of using them in programming languages tend to suck. In my experience you really want a great type system with really good inference to help you out as well. Otherwise I find they often descend into stringly typed messes despite the best intentions.