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

Macros and hoisting-embedding #22

Open
mitranim opened this issue Jul 11, 2014 · 0 comments
Open

Macros and hoisting-embedding #22

mitranim opened this issue Jul 11, 2014 · 0 comments

Comments

@mitranim
Copy link
Owner

Right now, there’s a difference between macros and global functions in the way they are hoisted and embedded. Functions respect the file’s scope and allow the user to override them: if a function is reassigned in the top scope before being referenced by name, it’s not embedded. Macros don’t allow themselves to be overridden and are embedded even if “reassigned” (referenced like (= myMacro ‘stuff’)).

We need to allow the user to reassign and reuse macro names in a similar way as with global functions. If a macro’s name is reassigned before a macro call, the macro should be blacklisted and ignored for the duration of this particular call of the compile function or this REPL session.

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