Subject: Re: DECLARE, DECLAIM and PROCLAIM that I'm not sure I understand the difference! From: Erik Naggum <clerik@naggum.no> Date: 1998/03/20 Newsgroups: comp.lang.lisp Message-ID: <3099416301467097@naggum.no> * Steven D. Majewski | PROCLAIM is clearly global. | The distinction for DECLAIM seems a bit fuzzy to me. PROCLAIM is a function that the compiler does not recognize in any special way. DECLAIM is a macro that (effectively) expands into a PROCLAIM at compile-time if it occurs at toplevel. | Is this because it's meant for the compiler and it really | means: "it depends on how your compiler wants to handle it" ? no, the semantics is clearly defined. effectively, (declaim (optimize speed)) is the same as (eval-when (:compile-toplevel :load-toplevel :execute) (proclaim '(optimize speed))) the only thing I would wish for is that DECLAIM had no effect when loading. loading a file with DECLAIM often introduces declarations that are not wanted at load-time, like OPTIMIZE settings. the consequence of this is that one has to wrap the proclamation in (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) and this sort of defeats the purpose of having DECLAIM in the first place, IMHO. an obvious counter-measure is to include OPTIMIZE settings in every file that is to be compiled. I wonder how the global declarations were intended to be used. #:Erik -- religious cult update in light of new scientific discoveries: "when we cannot go to the comet, the comet must come to us."