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

Re: Issue: LOAD-TIME-EVAL (Version 9)



> Which intuition are we talking about abandoning:
> 
>  Intuition #1: (DOTIMES (I 5) (PRINT (LOAD-TIME-VALUE (F))))
>                evaluates the LOAD-TIME-VALUE expression only once.
> 
>  Intuition #2: (DOTIMES (I 5) (PRINT (EVAL '(LOAD-TIME-VALUE (F)))))
>                evaluates the LOAD-TIME-VALUE expression at least 5 times.

Neither of these.  The only problem case is when the same EQ expression is
referenced from two or more places in the code.  Basically I think the
amendment would be to change the following paragraph:

   Implementations must guarantee that each reference to a
   LOAD-TIME-VALUE expression results in at least one evaluation of its
   nested <form>.  For example,
     (DEFMACRO CONS-SELF (X)
         `(CONS ,X ,X))
     (CONS-SELF (LOAD-TIME-VALUE (COMPUTE-IT)))
   must perform two calls to COMPUTE-IT; although there is only one
   unique LOAD-TIME-VALUE expression, there are two distinct references
   to it.

to something like:

   Implementations are not required guarantee that each reference to a
   LOAD-TIME-VALUE expression results in at least one evaluation of its
   nested <form>.  For example,
     (DEFMACRO CONS-SELF (X)
         `(CONS ,X ,X))
     (CONS-SELF (LOAD-TIME-VALUE (COMPUTE-IT)))
   may perform either one or two calls to COMPUTE-IT; although there is only
   one unique LOAD-TIME-VALUE expression, there are two distinct references
   to it.