4 ms·
For debugging, it's just as easy to save a copy of each frame state before modifying it, as it is to write in a functional style. Maybe easier.
by hgsgm 3y ago
For debugging, it's just as easy to save a copy of each frame state before modifying it, as it is to write in a functional style. Maybe easier.
- wyager 3y agoOnly if you exercise a high level of discipline in keeping all your state contained in the same place, having zero implicit state, and writing clonable data representations (i.e. no impredicative references, or some kind of serialization strategy that can deal with them). 99% of programmers do not write code this way when using imperative languages.
- c_crank 3y agoThe Java Enterprise style of over-abstraction that everyone hates does this, so plenty of imperative programmers will know of it and probably have implemented it to an extent.
- TillE 3y agoYou need to do this anyway if you're implementing saved games. Most modern PC games/engines have a really good instant quicksave system which dumps the entire world state very quickly.