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

Re: load-time-eval



	
    Date: 13 Feb 86 13:23 PST
    From: Gregor.pa@Xerox.COM
    To: Common-Lisp@SU-AI.ARPA
    Subject: load-time-eval
    Message-ID: <860213-132305-1680@Xerox>
    
    I think someone has mentioned this before, but Common Lisp needs a
    load-time-eval or deferred-constant facility.
    
    load-time-eval    (form)     [macro]
    
    When evaluated (by the evaluator) simply evaluates form and returns its
    result.
    
    When a use of load-time-eval is compiled (by compile-file) arranges for
    form to be evaluated at load-time.  The call to load-time-eval when
    evaluated will then return the result of having evaulated the form
    
    When compiled to core (by compile-file) simply evaluates form at compile
    time and arranges for the call to load-time-eval to return the result of
    evaluting form.

What is the meaning of the phrase "When [a use of LOAD-TIME-EVAL] is
compiled to core (by COMPILE-FILE)..."  and how does it differ/relate
to the meaning of the phrase "When a use of LOAD-TIME-EVAL is compiled
(by COMPILE-FILE)"?  They sound the same to me.
    
    It seems like it should be easy for implementors to implement this using
    the mechanism they already have for #,.
    
    Or we could have a deferred constant facility like the one in Interlisp.
    
    Or we could have both.
    
    We need something though, because the fact that you can't use #, in a
    macro and have it do "what you want" makes #, of limited usefulness.

How does LOAD-TIME-EVAL relate to #,?  Could you give an example?  Sorry to be so dense, but I didn't see the prev. disc. on this.

	-- Nick