From: Drew Adams <drew.adams@oracle.com>
To: "Johan Bockgård" <bojohan@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
Paul Eggert <eggert@cs.ucla.edu>,
emacs-devel@gnu.org, Juri Linkov <juri@linkov.net>
Subject: RE: master 71783e9: Add the string-numeric-lessp function
Date: Mon, 7 Mar 2016 14:03:53 -0800 (PST) [thread overview]
Message-ID: <2c4c309f-e55e-4e14-9c0f-cc5c30e4bf9c@default> (raw)
In-Reply-To: <87egbmf0s3.fsf@gnu.org>
> > Or else the rule should be clarified to incorporate
> > `-lessp' exceptions, so they are within, and not outside,
> > the rule.
>
> I think the rule in the Emacs Lisp manual is too simplistic. In
> practice
> we seem to follow something closer to this rule:
>
>
> By convention, the names of predicates usually end in the letter
> p (which stands for ``predicate''). Common Lisp uses a uniform
> convention in hyphenating names of predicates. If the name of the
> predicate is formed by adding a p to an existing name, such as
> the name of a data type, a hyphen is placed before the final p if
> and only if there is a hyphen in the existing name. For example,
> number begets numberp but standard-char begets standard-char-p.
> On the other hand, if the name of a predicate is formed by adding
> a prefixing qualifier to the front of an existing predicate name,
> the two names are joined with a hyphen and the presence or absence
> of a hyphen before the final p is not changed. For example, the
> predicate string-lessp has no hyphen before the p because it is
> the string version of lessp (a MacLisp function that has been
> renamed < in Common Lisp). The name string-less-p would
> incorrectly imply that it is a predicate that tests for a kind of
> object called a string-less, and the name stringlessp would
> connote a predicate that tests whether something has no strings
> (is ``stringless'')!
>
> from CLTL,
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node69.html
FWIW, that sounds reasonable to me. It would be harder for the
casual developer to pay attention to (need to distinguish the
two cases, recognizing whether it is about prefixing an existing
predicate). But given enough experienced eyes to catch an
oversight, it's a good idea, IMO.
If we go that route, let's make this change explicit, and not
just leave the old "simplistic" rule in place in the doc.
prev parent reply other threads:[~2016-03-07 22:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160221043348.25201.81719@vcs.savannah.gnu.org>
[not found] ` <E1aXLiO-0006ZB-4R@vcs.savannah.gnu.org>
2016-02-21 4:43 ` master 71783e9: Add the string-numeric-lessp function Lars Ingebrigtsen
2016-02-21 5:36 ` Lars Ingebrigtsen
2016-02-21 6:15 ` Stephan Mueller
2016-02-21 10:02 ` Lars Ingebrigtsen
2016-02-21 19:35 ` Yuri Khan
2016-02-22 2:51 ` Lars Ingebrigtsen
2016-02-22 17:59 ` Richard Stallman
2016-02-21 21:30 ` Paul Eggert
2016-02-22 1:32 ` Andy Moreton
2016-02-22 4:01 ` Paul Eggert
2016-02-22 16:11 ` Eli Zaretskii
2016-02-22 2:53 ` Lars Ingebrigtsen
2016-02-22 3:50 ` Paul Eggert
2016-02-22 4:00 ` Lars Ingebrigtsen
2016-02-22 4:16 ` Paul Eggert
2016-02-22 4:22 ` Lars Ingebrigtsen
2016-02-22 5:56 ` Paul Eggert
2016-03-07 0:16 ` Juri Linkov
2016-03-07 0:53 ` Paul Eggert
2016-03-07 17:45 ` Richard Stallman
2016-03-07 17:49 ` Lars Magne Ingebrigtsen
2016-03-07 23:55 ` Juri Linkov
2016-03-07 23:52 ` Juri Linkov
2016-03-08 2:06 ` Paul Eggert
2016-03-08 9:26 ` Andreas Schwab
2016-03-09 9:26 ` Paul Eggert
2016-03-07 2:27 ` Drew Adams
2016-03-07 21:14 ` Johan Bockgård
2016-03-07 22:03 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c4c309f-e55e-4e14-9c0f-cc5c30e4bf9c@default \
--to=drew.adams@oracle.com \
--cc=bojohan@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=larsi@gnus.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).