Arc Forumnew | comments | leaders | submitlogin
2 points by kennytilton 6116 days ago | link | parent

I am starting to reconsider, had an epiphany looking at the K code, realized how much friction there is in not being able to see all my code at once, and yes I have two big flat panels going. Maybe pg is on the right track. I just wish it was a Lisp-2 to elim that name collision issue.


6 points by sacado 6115 days ago | link

You know what ? I didn't like Lisp-2. Couldn't understand how that stuff could be useful.

That was before Arc. I named a table tab for once. That's also a macro's name, but I didn't know. Guess what happened when I did (tab 'foo).

-----

5 points by kens 6115 days ago | link

Am I the only person who keeps trying to use t as a variable name? It's the perfect name for a temporary, a table, a test value, ...

-----

2 points by kennytilton 6115 days ago | link

I have to be coding pretty fast and furious in CL but it has happened a few times over the years. Nice warning or error (I forget) from the compiler, tho.

-----

1 point by cooldude127 6115 days ago | link

also the perfect name for a true value :D

but yeah, i've done that in my CL code before. so annoying.

-----

3 points by nlavine 6115 days ago | link

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

-----