[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disassemble and compile questions
- To: bs%hplabs.csnet@CSNET-RELAY.ARPA, common-lisp@SU-AI.ARPA
- Subject: Re: disassemble and compile questions
- From: Daniel L. Weinreb <DLW@SCRC-QUABBIN.ARPA>
- Date: Tue, 1 Oct 85 14:40 EDT
- Cc: bs@hplabs.CSNET
- Fonts: CPTFONT, CPTFONTB, CPTFONTI
- In-reply-to: <8509301829.AA12153@HP-VENUS>
Date: Mon, 30 Sep 85 11:28:47 pdt
From: Bob Shaw <bs%hplabs.csnet@CSNET-RELAY.ARPA>
Is it allowable to have a function object that is specified by
a lambda-expression but is not stored as a lambda-expression or
compiled code? In other words, does Common Lisp allow intermediate,
iterpretable representations? If it is possible to have such a
function object, is there a mechanism by which it can be later compiled?
In my opinion, this is the correct answer: Any Common Lisp
implementation is allowed to have its own, non-standard (not in CLtL),
additional kinds of functions. Programs written in such a way as to
make this additional thing visible might not end up being portable. So
in your case, the answer is yes, it's OK for you to put in your own
additional (intermediate, or whatever) representation, but programs that
want to be portable will have to not depend on its existence.
If I interpret "may" as "must" in the preceding statement, then, for
such an intermediate form, (apply 'f 1 2 3) is legal, but
(apply (symbol-function 'f) 1 2 3) is not.
I don't understand how you conclude this. The latter form is also legal.
After all, it is defined that what happens when you apply a symbol is
that the object in the symbol's function cell is applied instead (see