Re: Package nicknaming at :use time or reader time
- From: Peter Schuller <peter.schuller@xxxxxxxxxxxx>
- Date: Thu, 17 Jul 2008 19:37:11 +0200
"John Thingstad" <jpthing@xxxxxxxxx> writes:
Well :nick allows you to use short package names without causing conflict.
If short names conflict one has :shadow and :shadow-import.
Hmm. I cannot find :nick in the clhs page for defmacro. Am I missing
something, or did you mean :nicknames? If the latter, my problem there
was that the choice of nicks happens at package definition, rather
than package use.
Shadowing imports may help if one is lucky, but it still requires me
to choose one or the other - I can't access both without using the
fully qualified name, or a short name provided by the author of the
package.
(setf (symbol-function 'new-name) 'package:old-name) gives a function
a new local name.
This is true, but I am worried about it causing unintended
side-effects because it won't *be* the same symbol (for example,
suppose a package provides a macro that traverses a body of code
looking for calls to some particular function by checking symbol
equality, or by looking at other properties of the symbol).
In this regard I was hoping a read-time alias would provide the
desired semantics since the read data structure should be
indistinguishable from what you would have gotten had you typed out
the full name.
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@xxxxxxxxxxxx>'
Key retrieval: Send an E-Mail to getpgpkey@xxxxxxxxx
E-Mail: peter.schuller@xxxxxxxxxxxx Web: http://www.scode.org
.
- Follow-Ups:
- Re: Package nicknaming at :use time or reader time
- From: John Thingstad
- Re: Package nicknaming at :use time or reader time
- References:
- Package nicknaming at :use time or reader time
- From: User Scode
- Re: Package nicknaming at :use time or reader time
- From: John Thingstad
- Package nicknaming at :use time or reader time
- Prev by Date: Re: Package nicknaming at :use time or reader time
- Next by Date: Re: atoms in a list interned when called by another package. why?
- Previous by thread: Re: Package nicknaming at :use time or reader time
- Next by thread: Re: Package nicknaming at :use time or reader time
- Index(es):
Relevant Pages
|