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

Devise a better system for storing variables in scope #38

Open
incrediblesound opened this issue Jun 30, 2016 · 2 comments
Open

Devise a better system for storing variables in scope #38

incrediblesound opened this issue Jun 30, 2016 · 2 comments

Comments

@incrediblesound
Copy link
Member

No description provided.

@TheLoneWolfling
Copy link
Collaborator

So, a couple of thoughts:

  1. Tangential: the current approach of "C call stack mirrors the huo call stack", although it works for now, can cause problems. I personally prefer non-recursive intrepreters. This would require a lot of rewriting.
  2. How do we want to handle scope? Straight lexical scoping? Other?
  3. Do we want explicit nonlocal / global statements, similar to Python?

Effectively, figure out the API and then figure out how to get the language to implement the API.

@incrediblesound
Copy link
Member Author

  1. I like the idea of the non-recursive interpreter. I think I'll play with that idea because it's clear to me now that the current recursive approach is too confusing. I will probably make a simple prototype in JS to understand the stack based approach before I attempt it here, but this is exactly the kind of problem I enjoy working on.
  2. Hmmm, I'm not sure about the implementation details of lexical scoping vs. dynamic scoping. I will do more research.
  3. I think global statements are generally useful, but it might be interesting to leave them out!

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

No branches or pull requests

2 participants