Prev: Shape Symbology as a Basis for Lisp or Other AI Software Development
Next: Make Money From Home - How to Deal With Distractions
From: Joubert Nel on 25 Dec 2009 20:58 On Dec 25, 12:57 pm, p...(a)informatimago.com (Pascal J. Bourguignon) wrote: > Joubert Nel <joubert....(a)gmail.com> writes: > > But when functions execute, don't symbols they encounter get read in > > the same package as the home package of the function's name symbol? > > There's no CL:ENCOUNTER function. > What do you mean by a "function encounters a symbol"? > > The symbol used in the definition of the function are read or produced > long before the function is compiled or executed. > > When the function is executed, no reading occurs, unless of course the > function calls CL:READ (directly or indirectly, including > CL:READ-FROM-STRING). Then the run-time value of CL:*PACKAGE* is used > to intern the symbols read, as specified by clhs intern, which is > called by CL:READ (check also clhs read). > > This run-time value of CL:*PACKAGE* is unrelated to the read-time > value of CL:*PACKAGE* when the function was read, or the package You're right. This all makes sense when you remember than functions don't belong to packages. Their name symbols have home packages and can be interned in other packages, but functions themselves are not package-bound (bound in the English sense, not the Lisp sense :-) Thanks guys. |