4 ms·
Readme is also a nice way to understand the Type state pattern. Well done! What about transitions to the same state that mutate? E.g. for a type state builder
by sureglymop 2y ago
Readme is also a nice way to understand the Type state pattern. Well done!
What about transitions to the same state that mutate? E.g. for a type state builder pattern. Let's say you have a "Jar" and want to "fill()" it over and over before "seal()"-ing it which is when the state change would happen?
Would that be considered no longer a type state pattern? Would all the fill states need to be encoded as types?