Arc Forumnew | comments | leaders | submitlogin
5 points by NickSmith 5932 days ago | link | parent

I am new to Lisp as well, so please excuse my ignorance as I am probably missing something thats obvious to others here.

Does this mean then, that whenever we make a change to a macro definition we must also redefine every function that already depends on the original macro definition? If this is the case then I would imagine there's a lot of tricky maintenance required for a program that has lots of 'layers' when a 'base' macro is changed.



7 points by soegaard 5932 days ago | link

Yes, which is why DrScheme restarts the REPL everytime the run button is used.

See http://list.cs.brown.edu/pipermail/plt-scheme/2008-February/... for a more elaborate explanation.

-----

1 point by NickSmith 5932 days ago | link

Thanks Soegaard. That is really useful :)

-----

3 points by pg 5932 days ago | link

Yes. The way most Lisp hackers deal with this is to (a) define macros before functions that use them and (b) use the function load, which evaluates all the expressions in a file in order.

-----

3 points by kennytilton 5932 days ago | link

This breaks down on bigger projects spread across multiple source files, at which point one needs some "make" tool such as ASDF for CL where one can pile macros into earlier files and then make other files with code using those macros dependent on the macro-bearing file(s). This can make for a lot of recompilation after minor changes, so I just take my chances and (yep) recompile all when in doubt (which with today's systems goes pretty fast).

-----

4 points by NickSmith 5932 days ago | link

Ah right, I get it now. Thanks. I knew there had to be a workaround somewhere.

BTW, kudos for sticking to your guns on first principles Paul. Arc really is a joy to learn and use.

-----