Hacker News new | ask | show | jobs
by kpil 3713 days 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.