Arc Forumnew | comments | leaders | submitlogin
3 points by nlavine 6148 days ago | link | parent

That's an issue with variable bindings being messed up, not a Lisp-1 problem. That would work fine in Scheme, for instance.


1 point by lojic 6148 days ago | link

Is that because Scheme doesn't allow you to use a data item as the first item in a form? Or does it have some other mechanism currently lacking in Arc to help with this problem?

-----

4 points by nlavine 6148 days ago | link

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 6148 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 6148 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.

-----