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

Namespaces -- abstract out symbol expansion #73

Open
Tko1 opened this issue Jun 9, 2020 · 0 comments
Open

Namespaces -- abstract out symbol expansion #73

Tko1 opened this issue Jun 9, 2020 · 0 comments
Assignees

Comments

@Tko1
Copy link
Member

Tko1 commented Jun 9, 2020

Symbol expansion currently happens in our Namespaces struct's get function -- basically, it tries to figure out where we are referring to, based off of what namespace we are currently in, and what symbol we are asking for. For instance, in: my-ns , asking for: + will eventually cause get to find + in clojure.core/+.

However, recently we had to add a function for getting the Var @ a symbol, rather than its value -- and because it was made separately from the branch that added namespace-refers to symbol expansion, we now have two functions with symbol expansion, and one of them is now out of sync. Blah blah typical DRY blah blah. And while we surely will not need any more get functions (and in fact, we will be back to having just one get function, as get will be rewritten in terms of get_var().deref()), I am pretty sure we will use symbol expansion yet again for, I don't know, the backquote possibly. Either way, it should be its own function

@Tko1 Tko1 self-assigned this Jun 9, 2020
@Tko1 Tko1 changed the title Namespaces -- consider abstracting out symbol expansion Namespaces -- abstact out symbol expansion Jun 9, 2020
@Tko1 Tko1 changed the title Namespaces -- abstact out symbol expansion Namespaces -- abstract out symbol expansion Jun 9, 2020
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

1 participant