From: "Dimiter "malkia" Stanev" on
Tamas K Papp wrote:
> On Tue, 23 Feb 2010 09:38:52 -0500, Zach Beane wrote:
>
>> Ron Garret <rNOSPAMon(a)flownet.com> writes:
>>
>>> The more usual case (at least for me) is to load a whole bunch of code
>>> having forgotten to load the corresponding library. At that point it's
>>> not just one symbol that's potentially conflicting, it's a whole bunch
>>> of them. And shadowing-importing them all may or may not be the right
>>> thing to do. And in any case you then still have to reload all the
>>> client code.
>> As soon as I'm working on a project that depends on a library, I write
>> an ASDF system for it that loads the library before it loads my code. I
>> do this even if the project is a single file.
>>
>> Even for scratch projects, the first thing I put in a file is a
>> defpackage form that uses CL and nothing else, and manually load
>> libraries as needed and use package prefixes. If I get sick of package
>> prefixes, I'll update the defpackage form and typically reach for
>> shadowing-import-from before use.
>
> I am doing something similar. I found that short nicknames are rather
> handy when I get tired of prefixes. I was wondering if it is "good
> practice" to give nicknames to other's packages after the DEFPACKAGE
> of my package, using RENAME-PACKAGE. Or should one just work with the
> nicknames defined by the original author?
>
> Tamas
>

Don't know about this, but I've used RENAME-PACKAGE for some kind of
scratching old work while working:

(defpackage "TEST" (:use "CL"))
(in-package "TEST")

(defconstant *test* 300)

#+nil
(rename-package "TEST" (gensym))

I had some big package, FFI bindings, and I did not want to start over,
so quick hack is to simply (rename-package "TEST" (gensym)) (For
non-lispers, this involves going say at the end of the (rename-package
"TEST" (gensym)) <- Here) and pressing Ctrl+X Ctrl+E