From: Steve Bacher (Batchman)
Subject: Compiled constants in Lisp (was: Re: Link and go)
Date: 
Message-ID: <8926@xenna.Xylogics.COM>
>From: Ken Dickey <ยทยทยทยท@tekchips.labs.tek.com>

JD>However, Lisp needs different sorts of initialization than does C.
JD>For example, symbol and list constants have to be created.  Since
JD>"ln" doesn't do such things, some sort of trick has to be used (maybe

Presumably you mean "ld".  But never mind.

JD>the user has to call some init procedure from "main"), or else rather
JD>severe restrictions must apply.

KD>Constant data is immutable [in Scheme, and I presume CL] and does not
KD>require runtime initialization.  

There is a big difference between symbols and lists, as Jeff Dalton
refers to above, and the ints and chars of C.
Symbols must be interned, which means that a run-time operation must
take place upon loading the compiled Lisp code; they are not just
strings of characters, but objects which have identity based on their
location in memory such that different symbols used in different modules
with the same names are "the same" (EQ) symbol.  Lists can contain any
other Lisp objects, including symbols, so they present essentially
the same problem.

KD>                                  Automatic memory management usually
KD>needs some initialization, but that is not typically supplied with C.
KD>If all data is statically declared, no memory management may be needed.

But see above - this is generally impossible to arrange for in typical
Lisp code.

KD>I really do not see this case being different between C and compiled
KD>Lisps. [Code is code and data is data, (except, of course, in Lisp) :^].

This is why it IS different.


					- Steve Bacher
					- Charles Stark Draper Laboratory

#.(make-disclaimer :type 'standard :verbose nil)