At 02:00 PM 8/19/98 +0200, Michael Sperber [Mr. Preprocessor] wrote:
>>>>> "Holger" == Holger Schauer
<schauer(a)coling.uni-freiburg.de> writes:
>>>>> "MS" == Michael Sperber schrieb am 19 Aug 1998 09:36:44
+0200:
MS> I don't understand that last sentence. If I create a
package,
MS> and I put abstractions in that package, may they be syntactic or
MS> semantic abstractions, I want those abstractions to be able to
MS> access bindings in the package.
Holger> Which is of course possible if you use packages in CL ;-)
Yeah, if I use explicit qualification, which amounts to not using the
package system at all.
No it doesn't. It's a very important part of the package system.
How about this?
(defpackage pkg1 (:export foo))
(in-package :pkg1)
(setq bar 23) ; could be (defvar bar 23)
(defmacro foo () 'bar)
(defpackage pkg2 (:use pkg1 cl))
(in-package :pkg2)
(let ((bar 42)) (foo))
MS> Absolutely. I just fucked up the example. In the case of
MS> special variables, you do want the macro to refer to the
MS> dynamically bound version.
Holger> I was under the impression that setq at the toplevel would
Holger> automagically be declared special, but obviously this is not true for
Holger> (or required by) the current ANSI standard as readable in the
Holger> HyperSpec. (CMUCL does this, IIRC, Allegro CL doesn't).
So what's the politically correct way to define top-level bindings
which are not special in Common Lisp?
Why would you want them?
Craig Lanning
E-Mail: CraigL(a)InternetX.net