4 ms·
Mostly the second one. You’ll have a single bit of boilerplate checking the current state and jumping to the right bit of code; but when you’re actually impleme
by iainmerrick 3y ago
Mostly the second one. You’ll have a single bit of boilerplate checking the current state and jumping to the right bit of code; but when you’re actually implementing the core logic of your state machine, you’ll be doing lots of “state = do_the_next_thing; return” instead of just calling “do_the_next_thing()” directly.
- xwowsersx 3y agoThanks, when I said "or" there I meant to provide just another example of a state machine type implementation so they weren't to the exclusion of each other..theu were both examples of explicit state machine. Thanks for your point though a lot state = vs return next_thing.