From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#26564: Document that only functions and not variables can end with "-p" Date: Wed, 19 Apr 2017 15:01:04 -0700 (PDT) Message-ID: <716db14c-b67b-4477-b4c2-75478df0c313@default> References: <87h91kdqdv.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492639332 29278 195.159.176.226 (19 Apr 2017 22:02:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2017 22:02:12 +0000 (UTC) Cc: 26564@debbugs.gnu.org, Kaushal Modi To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 20 00:02:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xfp-0007Ts-8L for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Apr 2017 00:02:05 +0200 Original-Received: from localhost ([::1]:50728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0xfv-0004lz-6s for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Apr 2017 18:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0xfp-0004lu-HG for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 18:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0xfm-0007C2-CP for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 18:02:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0xfm-0007Bv-9h for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 18:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0xfm-00086Z-1q for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 18:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Apr 2017 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26564-submit@debbugs.gnu.org id=B26564.149263927731105 (code B ref 26564); Wed, 19 Apr 2017 22:02:02 +0000 Original-Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:01:17 +0000 Original-Received: from localhost ([127.0.0.1]:57549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xf2-00085d-Ng for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:01:16 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:42247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xf0-000858-TA for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:01:15 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3JM17xw032680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:01:08 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3JM17I7014528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:01:07 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v3JM15hS025189; Wed, 19 Apr 2017 22:01:06 GMT In-Reply-To: <87h91kdqdv.fsf@drachen> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131773 Archived-At: > > 3. Is there a proposal for a _different_ naming convention > > for Boolean variables? I'd argue that we should have some > > such a naming convention. And I'd argue that it should be > > different for options and non-option variables. >=20 > That's a good point indeed. >=20 > An alternative to "-p" would be "is-", like `foo-is-negative'. Not great for cases where "has-" would be more appropriate (and vice versa, for cases where "is-" would be more appropriate). Not good for lots of other cases too. E.g., `box-cursor-when-idle-p' or `use-foo-bar-p' or `remove-foo-props-p' or `iac1-was-cycling-p' or `foo-names-only-p' or `hl-line-when-idle-p'? I suggest we stay away from helper verbs (or even any words). Verbs, in particular, can be different for singular and plural (e.g. `fancy-candidates-p'). > Not using -p would also have an advantage: you could distinguish > boolean variables from variables bound to a predicate function. How is it difficult to distinguish those if `-p' is used for both? It's true that in some (very few) contexts just looking at "'foo-p" in some code might not let you know whether `foo-p' is a variable or a function (or is both), but it is trivial to find out which is the case, for any symbol that is already defined as a variable or a function.