Are state machines inherently bad?