Using the traditional definition of state machines, can state machine records be in multiple states at the same time? For example, if I have a User
model, can users be in both a subscriber
and in a promotional_period
state at the same time?
Note, I am not asking if it makes sense to do this, my question is - is it possible with state machines.
All the answers saying "no" are only correct if you are assuming the "typical" type of finite state machines (FSMs) known as deterministic finite automata (DFAs), which can only have a single active state at any given time.
However, this is not the only type of FSMs, and there is no good reason to restrict yourself to this type of mechanism in all cases. There are also nondeterministic finite automata (NFAs), which can be in any number of states simultaneously.
This isn't just academic, or even really about parsing (as the wikipedia links might imply): NFAs are actually quite simple and incredibly useful and are used in practice all over the place in both hardware and software implementations.
Basically, to design an NFA, you do it just like a DFA, but instead of having a "current state" and using the inputs to compute a "next state", you have a "current state set" and use the inputs to compute a "next state set". In hardware (e.g. FPGAs implemented in VHDL) this can be done literally simultaneously. In (single-threaded) software, this is typically done by just iterating through the current states in each "step" of the machine.