[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Kent M Pitman <KMP@scrc-stony-brook.arpa>, Gray%dsg.csc.ti.com@NSS.Cs.Ucl.AC.UK
- Subject: Re: LOAD-TIME-EVAL
- From: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>
- Date: Fri, 9 Sep 88 21:22:43 BST
- Cc: Cl-Compiler@sail.stanford.edu
- In-reply-to: Kent M Pitman's message of Fri, 9 Sep 88 12:04 EDT
> Dalton's approach is clever, but is not adequate for a number of reasons in
> any serious application. Here are a few that come quickly to mind ...
> - I'm not convinced that the spec for either the compiler or GENSYM is
> written in a constrained enough way to make me believe that all compilers
> will correctly handle the writing out and re-loading of that GENSYM.
I agree. But my eval-once trick seemed the least suspect way of doing this
when I first wrote it, because then it seemed that any quoted or load-time
eval object would not be safely modifiable. Is the current proposal to
allow modification in some cases?
Anyway, some of the potential gensym problems can be eliminated if the
gensym appears exactly once in the source. For example:
(defmacro eval-once (form)
`(let ((v ',(gensym))) ;the symbol persists between calls
(if (boundp v)
(set v ,form))))
I had thought that write/re-load problems with gensym were confined to
systems like KCL that were incorrect on other grounds. If this is not
so, cleanup issues seem in order.