3 ms·
I guess you can move an arbitrary amount of booleans (or enums) into the running state. I suppose that the very idea of variables is just to separate the state
by kpil 11y ago
I guess you can move an arbitrary amount of booleans (or enums) into the running state.
I suppose that the very idea of variables is just to separate the state from the code so that it's possible to handle complex states in generic code with a reasonable size...
On the other hand, a lot of bugs are related to that the resulting implicit state machine is not complete and/or correct...
The same question but including the program state is the interresting one. How much information/state is needed and needs to be shared, as it relates to how an algorithm scales.