[Ecls-list] LOAD-TIME-VALUE and literal object externalisation.

Samium Gromoff _deepfire at feelingofgreen.ru
Mon Apr 14 04:35:41 UTC 2008


At Sun, 13 Apr 2008 10:53:57 +0200,
Juan Jose Garcia-Ripoll wrote:
> 
> Hi Samium,

Good day Juan!

> On Fri, Apr 11, 2008 at 12:27 PM, Samium Gromoff
> <_deepfire at feelingofgreen.ru> wrote:
> >  So, here's the test case:
> >  (eval-when (:compile-toplevel :load-toplevel :execute)
> >   (defparameter foo (lambda ())))
> >
> >  (load-time-value foo)
> 
> Now, as for your code, beware that LOAD-TIME-VALUE may be evaluated
> _earlier_ than you expect, even before the DEFPARAMETER definition in
> your code. This is not the case in ECL, but the standard I think
> allows that.

Yes, I was half-aware of that, because of the

"...but the order of evaluation with respect to the evaluation of
top level forms in the file is implementation-dependent."

passage in L-T-V description, but I was not sure if it applies to
EVAL-WHEN.

I think this is one of the places where the CL spec could be improved,
by decreasing the astonishment factor :-)

Thank you!

regards, Samium Gromoff




More information about the ecl-devel mailing list