[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (load-time-value *package*) not correctly handled in interpreted mode
Joerg Hoehle <email@example.com> writes:
> (let ((*package* (load-time-value *package*))) ...)
> What do you think about this situation?
The moment of evaluation of the form within LOAD-TIME-VALUE is not
precisely specified. CLtL2 and dpANS are explicitly vague about this.
You should use one of the alternatives
(let ((*package* '#,*package*)) ...)
(defparameter current-package-at-load-time *package*)
(let ((*package* current-package-at-load-time)) ...)
Both work in CLISP. Since #, has been removed from ANSI CL, the second
alternative is probably the most portable one.