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

Top-level forms and eval-when in the compiler [and macrolet too!]



    Date: Wed, 11 Sep 85 01:15:31 EDT
    From: Tim McNerney <TIM at MIT-MC.ARPA>

    Should a CL compiler generate interpreted or compiled definitions
    for the the functions f and g in the following form?

    (macrolet (...)
      (defun f ...)
      (defun g ...))

In my opinion, Lisp compilers should compile any LAMBDA-expressions,
explicit or implicit, which could possibly exist at and after load time.
So the answer is yes.

This subsumes the case of top-level

  (setf (get 'foo 'bar) #'(lambda ...)),

The LAMBDA-expression doesn't get compiled by at least one aspiring
Common Lisp that I know of.  One shouldn't have to do a DEFUN here just
in order to cause compilation to happen.  That defeats the whole purpose
of anonymous functions.

Jonathan Rees