Light's Intern Strings
Discontinued
Intern strings have been discontinued in light. They may be revisited later, but for now are not included in the library.
Intern Strings are a relatively simple & lightweight datatype. They serve to save resources on serialization/deserialization of repeated "arbitrary" strings. This is done by holding onto an optional intern string "index" for each stream. This looks something like:
serialize internstr | |
---|---|
This means every intern string will be a "static" datatype, allowing strings to be reallocation merged. Using the same intern string in multiple places can also help compression, and speed up serialization/deserialization, because there is only one readstring/writestring call for each unique interned string used in a stream.
In the future, this might be expanded to a broader system which holds onto interned strings persistently between frames.