Re:Ask HN: Can a state machine be stateless?
by icsa on Sunday June 12, 2022 @05:28PM
(#31718449)
Partially, yes. The data and the calling code implement a state machine.
The difference is that you are separating the input & the current state from the state transitions. The state transitions can be encoded as a matrix or nested case/switch statements - which do not have state.
The difference is that you are separating the input & the current state from the state transitions. The state transitions can be encoded as a matrix or nested case/switch statements - which do not have state.