Daily Thought - 2024-11-25
Hey, I'm Hanno! These are my daily thoughts on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!
This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
I've been talking about a technique to work around the problem that instructions are not atomic. But why not just make them atomic in the first place?
First, that workaround is also a solution to rewinding, and seemingly the most promising one for now. That it works around the lack of atomicity is a bonus. Second, making instructions atomic is not trivial. Instructions would need to check the runtime state first, before making changes. That check and the changes made, would need to be in sync.
That's a lot of error-prone code to write and to test, and to keep working and tested. And on top of that, it will grow linearly with the number of instructions. Given that the bytecode interpreter is just a placeholder, and I want to compile to native code (and WebAssembly) eventually, that doesn't seem like a good use of resources.
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.