2 ms·
The two approaches also exist for in-application undo/redo stacks. You can either try to track the operation you did that will need to be undone, or you can tr
by jobigoud 12y ago
The two approaches also exist for in-application undo/redo stacks.
You can either try to track the operation you did that will need to be undone, or you can track the state of the document prior to the change, whatever change that be. I have found the second approach to be more robust and simpler to think about.
- anon4 12y agoThe first approach is mostly an optimisation when you need to operate in a memory-tight environment and can't afford to keep several complete copies of past states.
- xorcist 12y agoNot necessarily. The point here is that you reason about the complete state, not that you store it as-is. See for example git itself which has grown quite an efficient storage system despite the design ideas being as described in the article.