[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Top-level forms and eval-when in the compiler [and macrolet too!]
- To: TIM@MIT-MC.ARPA
- Subject: Top-level forms and eval-when in the compiler [and macrolet too!]
- From: Jonathan A Rees <JAR@MIT-MC.ARPA>
- Date: Wed, 11 Sep 85 11:40:11 EDT
- Cc: common-lisp@SU-AI.ARPA, RAM@CMU-CS-C.ARPA
- In-reply-to: Msg of Wed 11 Sep 85 01:15:31 EDT from Tim McNerney <TIM at MIT-MC.ARPA>
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?
(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.