(continued from 5/10)
When I was looking at a major overhaul of my scripts, I had a vague feeling that the trickiest part would be coordination between scripts. As long as a single script has a 64KB memory cap, anything that needs to exceed 64KB has to be split across multiple scripts. To do that, Script A sends a message to Script B and the two divide up the work. Visually, it looks something like this:

Mermaid diagram

Since in LSL and in my earlier custom languages a file is a script, you can read the same picture as:

Mermaid diagram

And because the development environment doesn’t surface the relationship between files at all, it ends up looking more like:

Mermaid diagram

— that is, the relationship between Script A and Script B is something you can only see by opening both files and reading them side by side.
On the other hand, message exchanges between different objects are by definition cross-object communication, so neither side needs to know the internals of the other script.

Mermaid diagram

In Hitoshina - Language, the .hl file raises the level of abstraction by one step and defines what would correspond to an object. With that design, each script can be declared as a script-typed variable, which makes it possible to manage LinkMessages between scripts. Concretely, if Script A is defined to send a LinkMessage on channel X to Script B but Script B doesn’t define a receiver for channel X, the compiler emits a warning.

Mermaid diagram

Below is sample code in Hitoshina - Language.

This language design lets me write message-passing logic without worrying about missing pieces, and it made cleaning up the script organization go far more smoothly.