Compiling forms
Hi all, Great feedback on this topic. Many thanks to all who responded! I hear you that compiler macros are highly non-portable (user beware!). Seeing that Larry's example works just fine if one puts the symbol function into a defparameter or defvar first, is interesting. That tells me that Lisp adds a little init routine to the tail end of every FASL file whose job after load-time is to pre-initialize all the vars. That seems the only way that one could have complicated initial values for these vars too. Interesting... I also found a way to accomplish this sort of stuff by using yet another level of indirection (even slower!). But this is going in the wrong direction for runtime performance. Mine was to compile a (PERFORM <index> args...) in place of every function call where that function was defined with a defun-eb. At compile time that function name is stored into a table of symbols that on reload get converted into their corresponding symbol-functions. But now, after having written that paragraph, I see that Larry's use of var forms to hold the function value and my indirection are essentially the same -- an extra level of indirection. And both get filled in after load-time by that secret init routine provided at the tail of the FASL files. So all I have to do is find a way to make these patch-up locations apparent to that secret initializer. Interesting... Dr. David McClain Chief Technical Officer Refined Audiometrics Laboratory 4391 N. Camino Ferreo Tucson, AZ 85750