emacs-devel
[Top][All Lists]
Advanced

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

Re: Document that symbol prefix "my-" (or other) should be left for user


From: Tim Cross
Subject: Re: Document that symbol prefix "my-" (or other) should be left for users
Date: Mon, 11 Jul 2022 05:20:53 +1000
User-agent: mu4e 1.8.5; emacs 29.0.50

"Bozhidar Batsov" <bozhidar@batsov.dev> writes:

> Agreed. Not to mention this prefix is not super common - a ton of people user 
> their name, initials, etc. E.g. `boz-my-command`. 
>

Yep, I have used my-command and often tx-command  (for my initials x =
cross and yes, not great due to tx/rx being often used for send/receive,
though never been an issue so far).

The other 'convention' I see is my/command or my~command. I do find my/
or tx/ appealing, although I haven't 'switched' to use it.

One possible 'nice' advantage of my- would be that if it was flagged as
a 'personal' or reserved prefix, borrowing customisations and
bits of code from others would potentially be easier to add (but I guess
perhaps that is not necessarily a good thing!).

I'd love to have real namespace support in elisp. Something like Cl
packages or even better, something like Clojure where you can require a
package and specify either a prefix alias used to access symbols from
the package/namespace or a list of 'refer' symbols which can be accessed
without prefix. Anything which could help enable the use of shorter
symbol names and eliminate the need to use prefixes to avoid name
collision would be great. 

Of course, on the other hand, with the exception of longer names, in
over 25 years of Emacs use and especially since the growth in elisp
packages, name collision is something I rarely run into, so the current
status quo does at least seem to work and completion mechanisms have
evolved to make completing with large numbers of candidates having the
same prefix work well and you do tend to get use to the name 'noise'.   



reply via email to

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