| ▲ | binary132 15 hours ago | |
I think my point is that types and “typestate” do not need to be two separate things. For example, in the Lua API for C, one obviously requires a Lua context handle in order to perform any other operations, so the handle must be obtained first, by calling the context initializer function. There is no need for an extra “typestate” parameter since the dependency is explicit and enforced. | ||
| ▲ | vatsachak 12 hours ago | parent [-] | |
My Ticket example is not the standard type state pattern. Usually the State is shimmied in as a generic into the type being mutated | ||