From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Predicate for true lists Date: Fri, 06 Jul 2018 20:38:47 +0300 Message-ID: <83601sl0wo.fsf@gnu.org> 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> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530898616 22055 195.159.176.226 (6 Jul 2018 17:36:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2018 17:36:56 +0000 (UTC) Cc: contovob@tcd.ie, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 19:36:51 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 1fbUf5-0005TC-ON for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2018 19:36:51 +0200 Original-Received: from localhost ([::1]:59118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbUh6-0005je-3w for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2018 13:38:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbUgz-0005jZ-F1 for emacs-devel@gnu.org; Fri, 06 Jul 2018 13:38:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbUgv-0006ZB-Fg for emacs-devel@gnu.org; Fri, 06 Jul 2018 13:38:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbUgv-0006Z7-BN; Fri, 06 Jul 2018 13:38:45 -0400 Original-Received: from [176.228.60.248] (port=2698 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fbUgu-0006zg-NQ; Fri, 06 Jul 2018 13:38:45 -0400 In-reply-to: (message from Drew Adams on Fri, 6 Jul 2018 10:16:11 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:227015 Archived-At: > Date: Fri, 6 Jul 2018 10:16:11 -0700 (PDT) > From: Drew Adams > Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org > > > 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. 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.