State Has No State

From StrategyPattern; emphasis mine -- KarlKnechtel

In contrast, a state usually has no variables. (State has no state, is what I say.) A state usually selects the next state of its context. A state tends to have lots of unrelated methods... -- RalphJohnson


That is, one of the key distinctions between StrategyPattern and StatePattern, if you care to draw a distinction. -- KK


EditText of this page (last edited January 3, 2013) or FindPage with title or text search