emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Naming guidelines for ELPA packages (was: Re: [NonGNU ELPA] New package:


From: Jim Porter
Subject: Naming guidelines for ELPA packages (was: Re: [NonGNU ELPA] New package: devil)
Date: Sat, 13 May 2023 21:29:42 -0700

On 5/13/2023 3:30 PM, Richard Stallman wrote:
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

   > How about something like "devil-keys"? That should make it clear that
   > the package has something to do with keys. It doesn't tell exactly what
   > it *does* with those keys, but I think a more-detailed description
   > belongs in the package description or the manual.

I like this way of serving both goals at once: a clue about what the job is,
and a name to distinguish this package from others for thatjob.


Maybe we could turn this into a general guideline, and document it somewhere on GNU ELPA (maybe the README). Something like the below? It could probably use some editorial work, but I thought an example "story" of choosing a package name might help explain things to readers.

----------------------------------------

Naming is hard. To assist package authors, here are some guidelines for choosing good Emacs package names. Package names should be:

  * Memorable: Aim for short, distinct names that users can easily recall.
* Intuitive: Names don't need to fully describe a package, but they should at least provide a hint about what the package does.

For example, suppose I've written a package that provides an interface between GObjects and Emacs Lisp, and named it "goeli". This isn't a very good name, since it's not easy to remember (users may find themselves asking, "Wait... was it 'goli' or 'goeli'?"), and it's nearly impossible to guess what it does from the name.

After thinking about it some more, I have a flash of insight: I'll call it "goblin" (for _GOb_ject _L_isp _In_terface)! This is easy enough to remember, but it's still not intuitive.

Perhaps the best name for a package like this would simply be "gobject". That's both memorable *and* intuitive.

However, after thinking about it yet again, I find myself disappointed: while "gobject" is a thoroughly practical name, it's just not very fun. Instead, I finally opt for a compromise: I'll still use "Goblin" when documenting the package and prefix names in my code with "goblin-", but I decide to submit it to GNU ELPA as "goblin-functions". While this isn't as descriptive as "gobject", it does at least provide a hint to the reader that this is a collection of functions (intended for other Lisp authors, as opposed to end users).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]