Daily Thought - 2024-12-06
< back to listI've been talking about rewinding for a while now. I believe that it will be an essential ingredient for interactivity and the immediate experience that I'm aiming for, so it's going to be a priority soon. Although I'm still working on static typing. And fixing some of those nasty bugs in the debugger is actually more important than either. Oh well, lots to do.
One important aspect of rewinding is I/O which, as I explained, is represented in terms of effects. This is not the only thing that effects are used for. The other big use case are errors. In essence, an effect is just a thing that, when executed, stops the program, returns control to the host, and tells the host about the nature of the effect.
If the effect is an error, then currently that's it. The program is over, and the developer can decide to restart. (Rewinding is going to change that though.) If the effect is a call to a host function, which is how I/O is implemented, then the host can do whatever that host function does, put the results on the stack, and resume the program.
There's more potential here though, which is what I'd like to talk about next.
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.