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

Packages & Compiling

    Date: Sunday, 11 January 1987 22:22:19 EST
    From: Timothy.Freeman@theory.cs.cmu.edu

    CLtL specifies the compiler by saying that "compiling a file of code
    should produce an equivalent but more efficient program".  Jon is
    saying "compiling a file of code should produce an equivalent but more
    efficient program, provided that the package environment at compile
    time is the same as the package environment at load time; otherwise
    all bets are off".  I can imagine ways of implementing compilers so
    that the qualifier about the package environment is unneccessary.

It's also true that if the value of *read-base* is different when you do
the compilation, or if the read table has been altered in any way, all
bets are off.  In other words, the phenomenon is not specific to
packages, but applies to any state information that affects the actions
of the Lisp reader.  The compiler has to be careful to do its reading
with all the parameters set appropriately.

Our implementation normally accomplishes this by using "file attribute
lists", property-list-like things expressed in a special text string
that lives in a comment at the head of the file.  However, this solution
was not adopted in the Common Lisp definition.  I agree that there
probably is not an adequate replacement available in pure Common Lisp.