Am I the only person who would prefer `state.red_to_orange()` for like... verbosity?
I guess that opens the door for things the compiler couldn't catch at compile time versus runtime maybe? (like... unexpected progression from one state to another, aka panic/exception).
There’s a middle ground. For example, Akka actors have a become method which defines the new state. Erlang gen_statem events simply tell the state machine what the next state should be. Definitely nicer than just “next”.
I guess that opens the door for things the compiler couldn't catch at compile time versus runtime maybe? (like... unexpected progression from one state to another, aka panic/exception).