Arc Forumnew | comments | leaders | submitlogin
2 points by evanrmurphy 5107 days ago | link | parent

> Here were wrote a function which took an argument named 'tag, and yet the interpreter still thinks tag is a macro, when clearly it's not a macro in this scope.

Another way to think about it is that arc does have scope, but it doesn't apply to macros. Macros can only be defined globally (you can't write a local macro), and they're expanded before any of the normal scoping rules come into play.

> What if name is defined as a macro by someone, somewhere?

Yes: it is something you have to worry about and it is arguably kludgy. But again, it's only for macros. If you're overriding globally defined functions or variables of any other type, it works.

> You just defined it as a function, but the interpreter still thinks it's a macro. How can this not be a bug?

It's a thoroughly-discussed design choice that some people don't like. You already linked elsewhere in this thread to aw's proposal of how to change it if you want to give it a try. [1]

---

[1] http://arclanguage.org/item?id=11697