-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 should be scoped like functions #339
Comments
Yes, I know... Scheme got this perfect but I really don't think we'll have time to work on these little staging and scoping details that most people don't notice. Maybe in version 4 :) |
Yeah, that's fair. I'm just opening an issue so that we know to do it when we have time someday. |
IMAO, local macros are more trouble than they are worth. Macros extend the syntax of the language, which is a Good Thing. Local macros are about making the syntax different in some places than other places, which strikes me as a Bad Thing. |
Macros do currently have some locality in that they can be limited to a module scope. |
Honestly that seems like as much locality as one really needs. The reason I wanted this originally was to be able to define and use macros without having them pollute the global namespace. Having them be module-local addresses that. |
To that end, macro declarations should probably be allowed in the same places that module declarations are. |
Ideally, the macro
@foo
would exist only within the scope of thelet
block.The text was updated successfully, but these errors were encountered: