You claimed there is a safety issue on "use after free" for empty types which are trivial. I am still waiting to see the proof.
You also keep saying there is no way to fix in C++, you can most definitely make those into compilation errors. And that is if you insist on advancing several states and calling them "stateN" is useful, which I have never done in my life.
Then the last paragraph is another flamebait plus getting into arguments of authority.
> You claimed there is a safety issue on "use after free" for empty types which are trivial. I am still waiting to see the proof.
I claimed that it is trivial to accidentally introduce safety issues when implementing _state_ machines in C++ like you are proposing. The "state" in "state machines" comes from the machine actually having some state. Naive state machines don't store state, and simple state machines can encode all their state in types, but real world state machines rarely do so (e.g. a regex engine).
> You also keep saying there is no way to fix in C++, you can most definitely make those into compilation errors.
Show how to do that then, e.g., for example for a simple file handle wrapper, that only allows reading a file once:
You also keep saying there is no way to fix in C++, you can most definitely make those into compilation errors. And that is if you insist on advancing several states and calling them "stateN" is useful, which I have never done in my life.
Then the last paragraph is another flamebait plus getting into arguments of authority.