Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oldie, but a goodie: forking-data-structure for locals #5

Open
ELLIOTTCABLE opened this issue May 26, 2013 · 0 comments
Open

Oldie, but a goodie: forking-data-structure for locals #5

ELLIOTTCABLE opened this issue May 26, 2013 · 0 comments

Comments

@ELLIOTTCABLE
Copy link
Member

Simply put: when we clone an execution, we currently share the old locals object between all clones. Any changes in a parallel clone will be reflected in concurrently-executing clones.

For a long time, we talked about using some sort of forking-data-structure (the equivalent of lexical scopes, but temporal) for locals-storage.

One alternative that's at the front of my mind, because I like anything simple, is to shallow-copy the locals every time the execution is cloned. This, however, leaves no recourse for modifying temporally-up-stream associations (basically, it makes us Just As Evil As CoffeeScript™.)

One last point of interest: don't forget how association-shadowing comes into play, here. Since we're considering shallow-copying the locals, that means all the associations would be the same: we could modify the existing association to reflect the change into all clones; or shadow the association to affect only the current clone. (Sounds like a solution?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant