💾 Archived View for dcreager.net › swanson › closing-over-values.gmi captured on 2023-11-04 at 12:02:43. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-11-14)

-=-=-=-=-=-=-

Closing over values

Swanson will need some form of encapsulation, where a value can be “moved inside” of a quotation. (Or alternatively, that a quotation can be a closure.)

A core problem to solve is that Swanson quotations have multiple branches, and every branch of a quotation must have the responsibility to dispose of any values moved inside the quotation. It cannot be possible to move a value into a proper subset of the quotation's branches. If you did, and invoked one of the other branches, nothing would ever consume the value, violating linearity.

This also comes up when considering whether to model stack values as a quotation, since that's just one specific example of moving values (the contents of the stack value) into a quotation.

Stack values can be quotations

..