all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Paul Eggert <eggert@cs.ucla.edu>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: RE: Naming predicates (was: master d0c77a1: Remove some assumptions about timestamp format)
Date: Fri, 28 Sep 2018 12:41:02 -0700 (PDT)	[thread overview]
Message-ID: <b6249924-d170-4d80-9604-a4d0d9f0630c@default> (raw)
In-Reply-To: <f98b0e4e-7a8e-2f74-94dd-a63d31d96e87@cs.ucla.edu>

> >    If the purpose of a function is to tell you whether a certain
> >    condition is true or false, give the function a name that ends in
> >    'p' (which stands for "predicate").  If the name is one word, add
> >    just 'p'; if the name is multiple words, add '-p'.  Examples are
> >    'framep' and 'frame-live-p'.
> 
> Thanks for the pointer; I'd forgotten that. But there are several
> counterexamples:

Yes, there are counterexamples of most of the conventions.

There also lots of examples of the conventions being followed.
And of course we are free to remove/abandon a convention,
if it's considered not worthwhile.

But as long as we have our defined conventions, the point is
to encourage their use, and so to discourage more and more
such counterexamples.

There could presumably (e.g., in the future) be some
intentional counterexamples, i.e., based on some reasons.
I don't know of any such so far, but the possibility is there.
We don't worship hobgoblin consistency for its own sake,
above all other considerations. ;-)

Other than that possibility, I expect that the existing
counterexamples are historical or accidental, where
"accidental" means unintended by the author and not
caught and corrected by reviewers. Stuff happens.

> The Common Lisp influence seems to be causing a lot of Elisp code to
> violate the guideline, which may help to explain why I can never
> remember it.

Indeed, Emacs Lisp and Emacs have their own conventions.

In some cases Emacs Lisp has a convention where Common
Lisp has none (nothing comes immediately to mind, but I'm
pretty sure there are some examples).

And vice versa. A good example is the Common Lisp
convention to name "special" variables (defvars) `*...*'.
Elisp has no convention for such naming.



      parent reply	other threads:[~2018-09-28 19:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180925021527.10418.61555@vcs0.savannah.gnu.org>
     [not found] ` <20180925021528.9A119204E8@vcs0.savannah.gnu.org>
2018-09-25 10:09   ` master d0c77a1: Remove some assumptions about timestamp format Michael Albinus
2018-09-26  1:09     ` Paul Eggert
2018-09-26  9:24       ` Michael Albinus
2018-09-26  9:39         ` Eli Zaretskii
2018-09-26  9:43           ` Michael Albinus
2018-09-27 20:46         ` Paul Eggert
2018-09-28  6:32           ` Eli Zaretskii
2018-09-28 10:26             ` Michael Albinus
2018-09-28 17:27               ` Paul Eggert
2018-09-29 13:35                 ` Michael Albinus
2018-09-28 14:45             ` Paul Eggert
2018-09-28 14:54               ` Michael Albinus
2018-09-28  1:50         ` Paul Eggert
2018-09-28 10:35           ` Michael Albinus
2018-09-28 17:39             ` Paul Eggert
2018-09-28 18:06               ` Naming predicates (was: master d0c77a1: Remove some assumptions about timestamp format) Stefan Monnier
2018-09-28 18:28                 ` Drew Adams
2018-09-28 19:12                   ` Paul Eggert
2018-09-28 19:26                     ` Naming predicates Stefan Monnier
2018-09-28 19:40                       ` Drew Adams
2018-09-28 19:41                     ` Drew Adams [this message]

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=b6249924-d170-4d80-9604-a4d0d9f0630c@default \
    --to=drew.adams@oracle.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.