What is the difference between a state machine and the implementation of the state pattern?
问题 I wonder if a state machine is just the state pattern at work or if there is actually a difference between those two? I found this article with the bold title "the state design pattern vs state machine" but at the end of the day he only says that the state pattern makes state machines obsolete but then doesn't describe what exactly is a state machine compared to the implementation of the state pattern . 回答1: The way I describe this difference to my colleagues is that state patterns are a more