I\'ve encountered a few implementations of state pattern in my programming experience, and done a few. I\'ve seen them used in various scenarios (mostly UI and parsing). The tro
Most of the times, the states in a state pattern design are handling more that one state (or substates of the state) which makes them harder to maintain.
If a state has any kind of selection in there, its mostly handling more than one state.
I takes a lot of discipline to keep the states clean.
A possible solution to this is to make more complex states statemachines themselves (HSM). This makes it a lot more readable at the upper level because it has to deal with fewer states.