From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Naming predicates (was: master d0c77a1: Remove some assumptions about timestamp format) Date: Fri, 28 Sep 2018 12:41:02 -0700 (PDT) Message-ID: References: <20180925021527.10418.61555@vcs0.savannah.gnu.org> <20180925021528.9A119204E8@vcs0.savannah.gnu.org> <87bm8lanwu.fsf@gmx.de> <87o9ck6270.fsf@gmx.de> <2cfc5ca3-d661-f431-397a-705682ab17eb@cs.ucla.edu> <877ej5ap0o.fsf@gmx.de> <3356af4b-f6f5-e353-6162-a5fa8880d223@cs.ucla.edu> <2a1f7389-0248-4920-ba11-ecc0b6aaee22@default> 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 1538163619 15247 195.159.176.226 (28 Sep 2018 19:40:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 19:40:19 +0000 (UTC) To: Paul Eggert , Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 21:40:15 2018 Return-path: Envelope-to: ged-emacs-devel@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 1g5ycY-0003sQ-NQ for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2018 21:40:14 +0200 Original-Received: from localhost ([::1]:45577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5yef-0000LF-BI for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2018 15:42:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5ydZ-00008A-N9 for emacs-devel@gnu.org; Fri, 28 Sep 2018 15:41:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5ydV-0004tL-KX for emacs-devel@gnu.org; Fri, 28 Sep 2018 15:41:17 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:44530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5ydV-0004sd-4f for emacs-devel@gnu.org; Fri, 28 Sep 2018 15:41:13 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8SJctvc072577; Fri, 28 Sep 2018 19:41:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=6Mj4R0uy9btCvOBSxVCUjla2M1BvhUI8pEC/dPlQxiQ=; b=AsZL0crX7Xd5IMygN40V2oLjjIvOzppSltqcFeu68bZiNjzuPaOZSITV7RvSH1nFNKth L85r4iTvo56wM5DqacGoh/UZvLStOtmnsdkgnmV8w+HSFQbQnkCIbWz91LRSiE1Q5h6a JyunNK7DQgFCjhaqdRcSeXtreYI60NQ8EQrxVHzo6vqRuoBjFJRgquVvsSplD4sqyy0M pnWJjI5Bb628TDQ6GgW1vLmOHrZ4dKacdDEkpcMIQtN9x1FW//EPMiLvoTJZioOtzlQa pbQOrffKa7xultdhzrzDBXtNCn88rcEKOBqODFKF8zSgq4v6QOPcUINT3P9TlMym2pBz AQ== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2mndpq28d0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Sep 2018 19:41:04 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8SJf3Lu024120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Sep 2018 19:41:03 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8SJf3IR013843; Fri, 28 Sep 2018 19:41:03 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9030 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809280193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230121 Archived-At: > > 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'. >=20 > 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.