2.6 Locations: #%variable-reference
(#%variable-reference id) |
(#%variable-reference (#%top . id)) |
(#%variable-reference) |
Produces an opaque variable reference value representing the
location of id, which must be bound as a top-level
variable or module-level variable. If no id is
supplied, the resulting value refers to an “anonymous” variable
defined within the enclosing context (i.e., within the enclosing
module, or at the top level if the form is not inside a module).
A variable reference can be used with variable-reference->empty-namespace, variable-reference->resolved-module-path, and variable-reference->namespace, but facilities like define-namespace-anchor and namespace-anchor->namespace wrap those to provide a clearer interface. A variable reference is also useful to low-level extensions; see Inside: Racket C API.