Package extensions usage

Svante v. Erichsen Svante.v.Erichsen at web.de
Wed Dec 30 21:47:41 UTC 2015


Hi!

On 2015-12-30 00:52:27+0100, Alessio Stalla wrote:
>  * package-local nicknames: the ability to specify, for each package, a
> list of nicknames for other packages which are in effect only in that
> package; available on ABCL and SBCL (
> http://www.sbcl.org/manual/#Package_002dLocal-Nicknames) and possibly other
> implementations I'm not aware of.

Very useful, and in my view missing from the standard.  I would use it all the
time, but portability is important for me.  There should be a CDR for this, but
I think it is not trivial to make usable with read-time conditionals.

Nicknames have two purposes: making names more convenient to write and read, and
sidestepping name collisions.  The nicknames specified in the standard,
i. e. nicknames given in a package definition for itself, only fulfill the first
purpose.

>  * "Hierarchical" packages: a naming convention for packages understood by
> the reader and a few support functions, which allow to have concise
> nicknames for a group of closely related packages, such as
> com.foo.mylib.api and com.foo.mylib.implementation. Found natively in
> Allegro CL (http://franz.com/support/documentation/current/doc/packages.htm)
> and in an open-source library by P. Bourguignon.

I do not see this as important.  Simple cases are trivially solved by
package-local nicknames, and complicated cases look like an antipattern to me.
Which library is that?

Aside: others have brought up Java, but note that that does not really have
hierarchical package names either: there is no mechanism for relative references
(code in package "foo.bar" cannot refer to symbols in package "foo.bar.baz"
other than through the full package name), and no way to restrict visibility to
a nontrivial “subtree” of the implied package structure.


Yours aye

Svante


-- 
Svante von Erichsen

GPG fingerprint: A78A D4FB 762F A922 A495  57E8 2649 9081 6E61 20DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20151230/399f357b/attachment.sig>


More information about the pro mailing list