News for hackers. Stuff that matters.
Re:State Machines II by MuffinFlavored on Sunday August 28, 2022 @04:18PM (#32631677)
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).

Re:State Machines II by rad_gruchalski on Sunday August 28, 2022 @05:02PM (#32632041)
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”.