Daily Thought - 2024-12-05
< back to listSo yeah, lots to consider about rewinding I/O effects. What's clear, is that different effects have to be treated differently, and that the host has to provide that information. So this is going to be one of the things that has to be part of the interface that the compiler and/or runtime can use to query the host.
Things get even more complicated, if the developer rewinds over an effect, makes changes, then moves forward again, re-running the modified effect. Again, there are easy cases. If the effect is a sound, just play the modified sound. But if it's a network request, the server might or might not handle a second, different network request well.
If the host doesn't know (because it allows generic network requests and has no understanding of the protocol), then I guess a general fallback would be to ask the developer what to do. Or refuse to do anything without restarting the program. So rewinding won't always be a completely smooth experience. But I hope it can be smooth enough to make it a big win overall.
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.