From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: seq-some-p and nil Date: Thu, 3 Sep 2015 10:50:28 -0700 (PDT) Message-ID: References: <1441295429.4215.0@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441302678 32091 80.91.229.3 (3 Sep 2015 17:51:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2015 17:51:18 +0000 (UTC) Cc: Nicolas Petton , Stefan Monnier , =?utf-8?B?U2ltZW4gSGVnZ2VzdMO4eWw=?= , emacs-devel To: John Mastro , bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 03 19:51:06 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXYfA-0004et-52 for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 19:51:04 +0200 Original-Received: from localhost ([::1]:50761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXYf9-0007xH-Cy for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 13:51:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXYem-0007wM-Me for emacs-devel@gnu.org; Thu, 03 Sep 2015 13:50:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXYei-0003HK-KV for emacs-devel@gnu.org; Thu, 03 Sep 2015 13:50:40 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXYei-0003HG-DZ for emacs-devel@gnu.org; Thu, 03 Sep 2015 13:50:36 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t83HoU74006012 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Sep 2015 17:50:30 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t83HoTcn009574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 3 Sep 2015 17:50:29 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t83HoTfE030948; Thu, 3 Sep 2015 17:50:29 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189536 Archived-At: > I think `seq-some-p' (or its successor) would also be more useful if it > promised to return the first matching element (the docstring says "any > element", though in practice it does return the first). Yes, like Common Lisp `some'. And IMHO, it is better to reserve the suffix `-p' for a function that does not return an especially useful result, i.e., that really is used mainly or only as a predicate. If `seq-some-p' returns a sequence element then it should be called `seq-some', without the `-p'. The fact that some functions that return useful non-nil results other than `t' can be used also as predicates does not mean that they should systematically be named with suffix `-p'. That suffix draws attention to the use as a predicate. A case such as `some-p' should not do that. Its name should say that it returns a sequence element.