Arc Forumnew | comments | leaders | submitlogin
4 points by nlavine 6116 days ago | link | parent

The reason (tab 'foo) doesn't work in arc is that ac (in ac.scm) effectively has a special list of macros, and when it compiles (tab 'foo), it looks up tab in the special list. What is really should do in a lisp-1 is look up tab in the same list that all the other variables are in, which is the list that (let tab (table) ...) will modify. (Yes, I know I'm simplifying. No, it doesn't matter in this case, unless you can think of a reason that it does.)

Also, there's only one list like this, and it has global scope, so you can't have local macros or anonymous macros.



2 points by lojic 6116 days ago | link

Ok, so if it worked that way, then (tab 'foo) would work, but you would have shadowed the tab macro, and thus lost the ability to use it, which doesn't sound like a problem if you didn't know tab was a macro to begin with.

Anyone know if this is how Arc will work, or if the current behavior is by intent?

-----

3 points by cooldude127 6116 days ago | link

the problem that other people have stated is that because arc's macros are unhygienic, allowing local variables to shadow macros causes some pretty serious problems.

-----