Ona Script Closures #41
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kayomn/ona#41
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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.