"Fractal" <···········@gmail.com> writes:
> when i update a macro:
> is there a way to update all dependent function easily ?
> (without reload/recompile the whole system)
Use an interpreter instead of a compiler.
For example clisp (or ecl's interpreter).
--
"Specifications are for the weak and timid!"
you mean: "don't compile; just load" ?
how do i "tell" the lisp system to use an interpreter ?
(i am pretty much new to this)
here is a CLISP session:
===========================
; SLIME 2005-04-27
CL-USER> (defmacro mac-1 (x)
(list 'list x x x))
MAC-1
CL-USER> (defun fun-1 (x)
(mac-1 x))
FUN-1
CL-USER> (fun-1 22)
(22 22 22)
CL-USER> (defmacro mac-1 (x)
(list 'list x))
MAC-1
CL-USER> (fun-1 22)
(22 22 22)
CL-USER> (mac-1 22)
(22)
CL-USER>
===========================
as you can see fun-1 wasn't updated...
Fractal wrote:
> hi,
>
> when i update a macro:
> is there a way to update all dependent function easily ?
> (without reload/recompile the whole system)
Maybe there is a way to set your Common Lisp implementation to
interpreted-only mode, but this is probably not a good idea. Many Common
Lisp implementations don't even have an interpreter.
So in general, you basically have to reload/recompile the system. If you
are doing small programs, it should be possible to handle this manually.
As soon as your programs become larger, it's a good idea to learn about
so-called system definition facilities, like asdf or mk-defsystem. They
make updating a running system relatively straightforward, and since
they know about the dependencies between subsystems, they can take care
of updating only what's necessary.
Pascal
--
OOPSLA'05 tutorial on generic functions & the CLOS Metaobject Protocol
++++ see http://p-cos.net/oopsla05-tutorial.html for more details ++++