Ona Script Closures #41
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add the ability to reference variables from the outer scope and have the compiler / runtime automatically resolve references which escape the local stack lifetime.
Closures could be implemented via Lua-like upvalues, however given that the program has a full AST representation this could be taken advantage of to create site-specific lexical scopes that only contain the closed-on variables in a far less runtime heavy manner.
My anticipation is that the following code:
May be restructured into the equivalent logic by the AST.
Closuresto Ona Script ClosuresResolved as part of #44.