Coding 2023-07-01

By Max Woerner Chase

The more I thought about how I wanted to handle errors from inside the Lox interpreter, the more I was inclined to try using the experimental effect system in OCaml. It's like, yes, I'm pretty sure OCaml absolutely would allow me to make a module level ref and twiddle it back and forth, but I'd rather scope the ref to the run function and make the caller handle the output. So, I've written the helper functions that produce the effects, but I need to do a bit more work to be able to get the effect handler into the run function.

Hopefully, if I skip ahead and around a bit, I can put together the proper code soon. Ideally, without going to the next chapter before I get all of this handled.

I can work on that later. For now (or, half an hour ago...) I should get ready for bed.

Good night.