3 ms·
Yes; or well: void step_bar(state *state) { state.x = state.s + 1 return step_foo(state) } This is where the single dispatch OOP with implicit c
by kazinator 3y ago
Yes; or well:
void step_bar(state *state)
{
state.x = state.s + 1
return step_foo(state)
}
This is where the single dispatch OOP with implicit class-scoped "self" reduces noise:
void state::step_bar()
{
x = s + 1;
return step_foo();
}
You have the tail calls, all variables in one place: x is always the same x.
You know which variables are being set in each state transition; no need to look through parameter positions in function definitions.