Next: Miscellaneous Efficiency Issues, Previous: Modular arithmetic, Up: Efficiency
Defines
nameas a global variable that is always bound.valueis evaluated and assigned tonameboth at compile- and load-time, but only ifnameis not already bound.Global variables share their values between all threads, and cannot be locally bound, declared special, defined as constants, and neither bound nor defined as symbol macros.
See also the declarations
sb-ext:globalandsb-ext:always-bound.
Syntax:
(sb-ext:global symbol*)Only valid as a global proclamation.
Specifies that the named symbols cannot be proclaimed or locally declared
special. Proclaiming an already special or constant variable name asglobalsignal an error. Allows more efficient value lookup in threaded environments in addition to expressing programmer intention.
Syntax:
(sb-ext:always-bound symbol*)Only valid as a global proclamation.
Specifies that the named symbols is always bound. Inhibits
makunboundof the named symbols. Proclaiming an unbound symbol asalways-boundsignals an error. Allows compiler to elide boundness checks from value lookups.