From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: PSA: please stop using weird symbol prefixes
Date: Mon, 11 May 2015 23:17:37 +0200 [thread overview]
Message-ID: <871tim24r2.fsf@debian.uxu> (raw)
In-Reply-To: mailman.2751.1431333428.904.help-gnu-emacs@gnu.org
Paul Rankin <hello@paulwrankin.com> writes:
> Lately I've seen a lot of seemingly random mode
> symbol prefixes, e.g. a mode called `foobar-mode`
> will use `fb:next-item` and elsewhere
> `fblatex:export-new` or perhaps `foobar/end-of-tree`
> etc. etc.
I think the foobar practice should be avoided even in
abstract "examples" because
1) It is often so that the examples get worse by this
habit - instead of real-world examples that might
take a couple of minutes to make up/find, but are
better in most cases, as they provide the example
with some context, which makes the principle easier
to understand, but also in the bargain shows some
(other) aspect of the system and how the principle
is typically put to use. (This is the same method
the good old school grammar books used. There were
a lot of abstract reasoning with word classes and
phrase analysis but then came examples with
specific phrases and you'd realize the theory but
also learn them phrases at the same time!)
2) If you do the foobar stuff in examples too much,
that will eat its way to real use soon enough.
The people who write it, or read it, or Google it,
it doesn't matter, one way or another it is always
like that.
What to name things in programming is a big part of
what makes for good code and bad. People may disagree
what is a good name and what is not as good.
But follow the simple principle that everything should
be named after its functionality and/or unique
properties (in the context) and it won't get that bad.
If it works, and everything is named according to this
principle (even badly so to some people) I don't think
anyone will have a case "the style is bad". A single
foobar tho is instant DQ.
> This approach grates against the Elisp coding
> conventions [...] It breaks
> `custom-unlispify-tag-names` ... autocompletion ...
> ... user expectation long established by code that
> properly follows the conventions that symbols ought
> to take the form PREFIX-some-symbol.
Most important it makes SENSE for things to be named
sensibly. Without that there is chaos. And not chaos
as in the jungle which actually is chaos only to the
untrained eye lacking the fine touch to decipher the
(sub)systems - it is chaos as in the mad dreams of
winter vomiting disease.
--
underground experts united
http://user.it.uu.se/~embe8573
next parent reply other threads:[~2015-05-11 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2751.1431333428.904.help-gnu-emacs@gnu.org>
2015-05-11 21:17 ` Emanuel Berg [this message]
2015-05-11 6:18 PSA: please stop using weird symbol prefixes Paul Rankin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tim24r2.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.