[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PROGN 'COMPILE



I agree that toplevel function calls don't want to get compiled, but there's
no reason not to flatten PROGN's. People could always pick constructs like:
PROG1 to put their forms in if they didn't want them to compile. Eg,

(PROG1 'TEMP-DEFINITIONS
	(DEFUN F (X) X)
	(DEFUN G (X) X) ...)

(F ...)

(PROG1 'REMOVE-TEMP-DEFINITIONS
	(FMAKUNBOUND 'F)
	(FMAKUNBOUND 'G) ...)

which is rather flavorful because it even gives you an obvious place to put
a comment about the stuff in the form. Even if PROG1 wanted to flatten out,
which I don't see any reason for, you could always use (EVAL '...) or could
bootstrap your way into a function that could help you out. eg,

(EVAL '(DEFUN PROGN-DON/'T-COMPILE X NIL))

(PROGN-DON/'T-COMPILE
  (DEFUN F (X) X)
  (DEFUN G (X) X)
  ...)

which presumably would not get compiled anyway, since it's a random function
reference. Then later you could do

(FMAKUNBOUND 'PROGN-DON/'T-COMPILE)

and the world would be back to normal. Given the ease with which it is possible
to trick the compiler into not compiling something, I don't understand why
(PROGN 'COMPILE ...) was ever invented either.

-kmp