[Ecls-list] symbol-macro usage

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat Feb 13 11:51:34 UTC 2010


On Sat, Feb 13, 2010 at 10:59 AM, Alexander Gavrilov
<angavrilov at gmail.com>wrote:

> As I understand, that file is an integration shim that activates
> when both def and common modules are loaded, but allows them to
> be used independently. Thus the 'common' one cannot directly
> contain a reference to def. Although it can probably include a
> placeholder in-package macro that by default directly expands
> to the common lisp one.
>

I do not understand much of that paragraph, but please understand the
following: according to the Hyperspec, the value of *package* has to be
changed exactly the same when compile-file and when load are used. In other
words, in-package can not have one argument at compile time and then, when
loading, deciding to use one or another package depending on what is
available. This is explained here
   http://www.lispworks.com/documentation/HyperSpec/Issues/iss063_w.htm
and summarized here without many of the important details from the previous
page
   http://www.lispworks.com/documentation/HyperSpec/Body/03_bdd.htm

If you need a symbol reference with a home package that depends on
previously loaded packages and want this to work reliably and portably, one
alternative is to use LOAD-TIME-VALUE with INTERN. Another, more reasonable
alternative in the presence of many such cases, is to create a proxy
package.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100213/d587bab0/attachment.html>


More information about the ecl-devel mailing list