Daily Thought - 2024-12-02
< back to listThere's quite a bit of overhead to making rewinding work. I think that's unavoidable, since immediacy is the central theme of Caterpillar, and "I ran into an error; have to set a breakpoint earlier, then restart and do the same things that led to the error, for a second time" is not very immediate.
But we shouldn't need to pay for the full overhead in every single situation. As I've noticed before, the overhead can be reduced significantly, by undoing groups of expressions as a unit, instead of supporting that for every single expression, one by one. But I think it's fine to have the full overhead during development, for the code you're currently editing.
Other code maybe doesn't need to be undo-able in as fine-grained a manner, although how to decide that specifically is still an open question. Maybe for third-party code, it's good enough (by default) to only undo a whole function call into that third-party code as a unit. And it should be possible to turn the feature off completely, in cases where you need all the available performance.
Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email whenever I post a new one.