[cdr-discuss] Extension packages (Re: file-local variables)

Pascal Costanza pc at p-cos.net
Thu Apr 28 18:51:46 UTC 2011


Hi,

I think something like :cdrNN as package names (or nicknames thereof) could actually work. I am not very afraid of fragmentation. Newer CDRs that supersede older CDRs can suggest to still use the old package names as well (if they are sufficiently similar enough). There could exist separate CDRs with suggestions for grouping several other CDRs in larger chunks, so you have common package names for a collection of more or less strongly related components.

Such a scheme could coexist with a more elaborate naming scheme that focuses on avoiding potential name clashes (although I'm not sure the latter would really pays off).

I see a design mistake in Common Lisp's package system in that the nickname is chosen by the package definition, not by the use site (for example as in (:use-package :horribly-long-package-name :as :hlpn)). That's probably harder to fix.

Maybe the Pro mailing list is a better venue for discussing such proposals, because that mailing list seems to be frequented by many active users.

[These are all my very own, very subjective opinions. The fact that I'm involved in maintaining the CDR repository doesn't mean my opinions have more weight than others. Just to be sure I mentioned that... ;)]


Pascal

On 28 Apr 2011, at 16:47, Marco Antoniotti wrote:

> Hi
> 
> packages and extensions are a pet-peeve of mine. :)
> 
> I feel strongly on the subject and I have followed the following conventions in my recent coding (conventions which hinge on a non-standard and unadvertised feature of many implementations: see below).
> 
> Most of my packages are now named as
> 
> "IT.UNIMIB.DISCO.MA.XXX.YYY.ZZZ"
> 
> Then they may have nicknames, which can be
> 
> "COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.STUFF" and "CL.EXT.DACF.STUFF" and "STUFF".
> 
> The naming scheme I adopted for the "COMMON-LISP.EXTENSIONS.CH" packages is that CH is the name of one of the ANSI chapters.  Of course, one could imagine a "COMMON-LISP.EXTENSIONS.NETWORKING" package and a "COMMON-LISP.EXTENSIONS.MULTIPROCESSING" package for things which do not appear in the ANSI.
> 
> I feel this satisfies my inner need for order.
> 
> Two notes:
> 
> The whole thing is predicated on an implementation raising an error (a PACKAGE-ERROR?) if two packages share nicknames; this is "mostly" the case.
> The naming scheme is lengthy and - as it was pointed out in the past - kind of "polluting".
> 
> I still do think it is worth exploring... Note also that I am not suggesting a file system mapping for packages.
> 
> Having said so, this may be worth a CDR by its own.  Yet, maybe this is not the right venue for such discussion.
> 
> Cheers
> --
> Marco
> 
> 
> 
> On Apr 26, 2011, at 14:39 , Nikodemus Siivola wrote:
> 
>> On 26 April 2011 14:31, Didier Verna <didier at lrde.epita.fr> wrote:
>> 
>>>  Yeah. This is something one needs to do in several occasions already
>>> (for instance to get MOP functions from packages named differently
>>> across implementations) and I don't think it's such a big deal.
>> 
>> Unless you use CLOSER-MOP. :)
>> 
>> I think a semi-standard package for extensions like this would be
>> good, but that's probably just my idealism speaking.
>> 
>> Cheers,
>> 
>> -- Nikodemus
>> 
>> _______________________________________________
>> cdr-discuss mailing list
>> cdr-discuss at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/cdr-discuss
>> 
>> 
> 
> --
> Marco Antoniotti
> 
> 
> _______________________________________________
> cdr-discuss mailing list
> cdr-discuss at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cdr-discuss

--
Pascal Costanza
The views expressed in this email are my own, and not those of my employer.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cdr-discuss/attachments/20110428/1c69b5b9/attachment.html>


More information about the cdr-discuss mailing list