Caterpillar

Daily Thought - 2024-07-03

< 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 >>