Crosscut

Daily Thought - 2024-07-03

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.

< back to list

Handling I/O through effects has some advantages. For one, the runtime can track and store those effects, which is useful if the developer rewinds the process to an earlier state. Not every effect can be undone, but at least if the developer replays the same (or modified) code, the runtime will know if it can reuse the result of the effect.

Effects can also be made visible to the developer, when displaying the code. You'll see exactly what a function call can potentially do. This can be used to run code in a sandbox, increasing the security of using 3rd-party code.

All of this means that Caterpillar code can't directly call code written in a different language. On the one hand this is good, because it increases security and reduces the potential for FFI-related errors. On the other hand, it makes calling such code less convenient, as you have to extend the host somehow to make it possible. We'll have to see how this plays out in practice.

<< previous thoughtnext thought >>

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.