From: Jochen Schmidt
Subject: Packagenames
Date: 
Message-ID: <9e8sr3$1kd62$1@ID-22205.news.dfncis.de>
We have talked upon using packagenames after a common scheme.
If I understand this right it would be counted good style if I would e.g
name my RSA package DE.DATAHEAVEN.CIPHER.RSA
As you can see this leads to rather long packagenames.
Another proposal was not to use nicknames in non-interactive code. (If I 
understood this right.
Would it be an idea to use package-nicknames to locally define shortnames?

E.g a 

(with-package-alias ("RSA" (find-package 'de.dataheaven.cipher.rsa))
  (rsa:generate-rsa-key 1024))

Which locally changes the nickname-list of the package within a 
UNWIND-PROTECT.

A
(use-package-alias "RSA" 'de-dataheaven.cipher.rsa)
...
(unuse-package-alias "RSA")

I'm not sure if this would be a good idea. But if all errors (e.g. already 
used packagenames) are resolved it could work.

There are also issues with MP here I think.

Regards,
Jochen
From: Kent M Pitman
Subject: Re: Packagenames
Date: 
Message-ID: <sfw7kzblvsy.fsf@world.std.com>
Jochen Schmidt <ยทยทยท@dataheaven.de> writes:

> 
> We have talked upon using packagenames after a common scheme.
> If I understand this right it would be counted good style if I would e.g
> name my RSA package DE.DATAHEAVEN.CIPHER.RSA

I've been using names like COM.HYPERMETA.HTTP.SERVER in writing the HTTP
server for my own, independent HTTP server.  I've found it not nearly as
onerous as it sounds like it would be.  Most of my packages just use the
relevant other packages, and only occasionally do they refer by name.
Where they do, it works fine.

I've found that making myself feel comfortable about claiming a package
name that is TRULY mine and doesn't have to satisfy anyone else (which is
something I always worry about when I'm treading on limited-namespace
of shortname packages) means I can have lots of different little packages
with exactly the sets of names I want to import for various purposes,
so consequently I import more often than I used to, and consequently the
long names are seen less often.

The same is true for Java, btw, and it seems to suffice for that very large
user base.

> As you can see this leads to rather long packagenames.

Why not import the names in cases where it's being used a lot?
Or write a macro or inline function that expands to the longer name.

> Another proposal was not to use nicknames in non-interactive code. (If I 
> understood this right.
> Would it be an idea to use package-nicknames to locally define shortnames?
> 
> E.g a 
> 
> (with-package-alias ("RSA" (find-package 'de.dataheaven.cipher.rsa))
>   (rsa:generate-rsa-key 1024))
> 
> Which locally changes the nickname-list of the package within a 
> UNWIND-PROTECT.

This won't work in a multi-tasking Lisp.  It will affect competing processes.