[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Interpretation of shadowing
CLtL describes in section 11.5, page 180 a name conflict problem by
applying the function use-package. The name conflict is between a symbol
directly present in the using package and an external symbol of the used
package. This name conflict may be resolved in favor of the symbol
directly present in the using package by making it a shadowing symbol.
However, CLtL gives no advice how that should be done.
In our understanding the function shadow should be used to resolve this
name conflict.
However the function shadow has no effect, if the symbol is already
present in the package (CLtL, section 11.7). So, following CLtL, this
could not be the solution. Therefore, we investigated some other CL
implementations:
Lucid Common LISP on Apollo DOMAIN as well as Xerox LISP:
The name conflict can be resolved by using the function shadowing-import
SPICE LISP:
The functionality of the function shadow in SPICE LISP is extended.
shadow works also if the symbol is already present. So, the name
conflict can be resolved by using the function shadow. (However, shadow
works different as described in CLtL.)
Kyoto Common Lisp on VAX:
shadow works as described in CLtL. The name conflict cannot be resolved
in this system.
How should CLtL be interpreted with respect to this problem?
Dieter Kolb