This is something I've been coincidentally pondering recently.

I see two advantages of hierarchical package names:
1)  Uniqueness of internal package names
2) The ability to reference internal packages easily as a relative specifier, without specifying the full absolute package name

Issue 1 is always solved by simple concatenation, and doesn't necessarily require new features of the package system. Issue 2 is provided by local package nicknames, which I do support. Using local nicknames for the purpose of internal packages would also promote this features' use probably more popularly than importing external libraries, at least at first.

A third "feature" of hierarchical package names is directory organization, but as others have mentioned, I don't necessarily consider that an advantage.

That said, I've not actually used these features in a real project, as portability is important to us.


The only place that I've seen nested packages be uniquely useful is in JavaScript's npm, where a single library can be loaded into the system in completely independent multiple instantiations. I don't know if this will ever have any relevance to Lisp system configuration, though.

I've coalesced some musings about hierarchical packages as foo:bar:my-symbol (as opposed to com.org.foo:my-symbol) which would give some more real meaning to a traversable hierarchy besides just being a naming convention.

Regarding splitting a system up into multiple packages, I agree that it should it not be done lightly. I use separate internal packages generally when code sections may be optional or independently loaded. Test suites and plug-in architectures are obvious examples.


On 12/29/2015 04:52 PM, Alessio Stalla wrote:
Hi everyone,

I'd like to run a little poll among experienced Lisp developers. The topic is the usage in the wild of the extensions to the package system provided by various implementations. My apologies to people who are subscribed to the ABCL mailing list, where some time ago I submitted the same questions getting back several insightful answers but no actual data.

So, here is how it is. I'm working on a novel idea (I hope) regarding symbols and packages; I won't go into the details now. It suffices to say that there is some overlap with features offered by certain Lisp implementations, namely:

* 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. * "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.

My questions:
1) First and foremost, is anybody actually using those features? What are you using them for? 2) If yes, how useful are they for you? What shortcomings do you find in them?


--
David Holz
Director, Grindwork Corporation
http://www.grindwork.com/


Reply via email to