Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ken
on Dec 12, 2019
|
parent
|
context
|
favorite
| on:
Things end users care about but programmers don't
Why would Undo be any harder to add post-hoc than any other feature? Encapsulate each action, codify its opposite, and push it onto the undo stack.
mark-r
on Dec 12, 2019
|
next
[–]
"Encapsulate each action and codify its opposite" is exactly the hard part of this. Too much code is written assuming it has access to the entire state of whatever it's modifying and doesn't have to worry too much about side effects.
buckminster
on Dec 12, 2019
|
prev
[–]
Most new features don't require changes to the logic of every existing feature.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: