Subject: Re: declaim? proclaim? From: Erik Naggum <erik@naggum.net> Date: Mon, 18 Feb 2002 12:06:30 GMT Newsgroups: comp.lang.lisp Message-ID: <3223022793121740@naggum.net> * Tim Bradshaw <tfb@cley.com> | I thought about this a bit, and I'm now confused. Imagine a situation | like this: | | (defvar *foo* (big-complicated-function)) | | (declaim (type fixnum) *foo*) | | Can this code be correct? Yes. It would be even if you switched the two top-level forms. | I'm not sure it can, because at compile time, *FOO* is not yet defined Of course it is. defvar must affect the compilation environment at least to the extent that it remembers that *foo* is a special variable. However, it does not necessarily have a _value_ until load-time. | So the type declaration can't (or may not) be true at compile time, I | think. The declarations are associated with the symbols, not with the bindings, but they affect the bindings because of the declarations associated with the symbol. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.