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: Predicate for true lists Date: Fri, 6 Jul 2018 11:00:43 -0700 (PDT) Message-ID: <95fda70b-5893-4788-83c5-a0bb5d708304@default> References: <<87fu3vdjjk.fsf@tcd.ie>> <<87bmcqhhsf.fsf@tcd.ie> <87in6xgtpb.fsf@tcd.ie> <2af892df-26cb-60b2-4fd8-067fcb3d32e9@cs.ucla.edu> <87r2kh9uwx.fsf@tcd.ie>> <<83h8lcnbxb.fsf@gnu.org> > <<83601sl0wo.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530899942 27483 195.159.176.226 (6 Jul 2018 17:59:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2018 17:59:02 +0000 (UTC) Cc: contovob@tcd.ie, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 19:58:57 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 1fbV0R-0006yh-NA for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2018 19:58:55 +0200 Original-Received: from localhost ([::1]:59190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbV2Z-0002KD-0f for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2018 14:01:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbV2R-0002K1-Vb for emacs-devel@gnu.org; Fri, 06 Jul 2018 14:01:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbV2R-0006OQ-5u for emacs-devel@gnu.org; Fri, 06 Jul 2018 14:01:00 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:54916) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fbV2N-0006KR-Fn; Fri, 06 Jul 2018 14:00:55 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w66Hs2L5188608; Fri, 6 Jul 2018 18:00:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=aGtLDQaK84l7+7XVUSi94hAFjQdiqGspty1U03/44+8=; b=As0YJJFPkDExJ85eJ9/+PpLvHKhkW0lKeW3CIDVFCOm0L+bl5bR6XR88AqCv/S41+s8a JbNl1KPonVPu33KQ9f4121UfB1FABqhymV+SiGokPM8iFSPmqppcuHsM6osl9hCFILJL lhAbfIb5UzG0FjlDqSIjDs9qEHD6d/8FjqaLh14EYW5Y74zH7hJWDtFi3gT379DainIN DpJZM0g6hIra84zDeBhnytyGp0CVp8LBwRWSkqVlxp+vFdEyEHPo2/kBcbOc3KvFQtlk JSYHxXlIBhFDHeRtyHHW9yevJEcjJKUN2tjiNKBYG8AvD9evDgh8UXLAFdvPqeooNTG6 tw== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2k0dnjtjxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Jul 2018 18:00:47 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w66I0kT4011153 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Jul 2018 18:00:46 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w66I0jOS030973; Fri, 6 Jul 2018 18:00:45 GMT In-Reply-To: <<83601sl0wo.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4705.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8945 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=767 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807060199 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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:227017 Archived-At: > > > Do we really want this usage of the function as a predicate? I find > > > this slightly unnatural, and also not future-proof enough, because > > > you rely on the checks 'length' does internally. If the internals of > > > 'length' change one day, this predicate usage will collapse like a > > > house of cards. Would it make more sense to have a separate > > > predicate? > > > > IIRC, the main motivation for adding this function was > > to provide a predicate for testing properness. >=20 > Then I'd prefer calling the function proper-list-p (and returning the > list length when it's a proper list) than the other way around. Then discoverability of the use for length is reduced. Just define it once (one function), using whichever name is preferred, AND alias the other name to the same function. That will help users discover it for both uses. And of course the doc string should point out both uses.