From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.bugs Subject: bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f Date: Thu, 05 Jun 2014 15:57:30 +0200 Message-ID: <871tv35uid.fsf@fencepost.gnu.org> References: <87y4y6t0or.fsf@fencepost.gnu.org> <1401821778-19972-1-git-send-email-dak@gnu.org> <87wqcxtk65.fsf@yeeloong.lan> <877g4x8e5p.fsf@fencepost.gnu.org> <87vbsh6l6b.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401976698 23076 80.91.229.3 (5 Jun 2014 13:58:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2014 13:58:18 +0000 (UTC) Cc: 17485@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jun 05 15:58:11 2014 Return-path: Envelope-to: guile-bugs@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 1WsYBE-0001qS-K7 for guile-bugs@m.gmane.org; Thu, 05 Jun 2014 15:58:08 +0200 Original-Received: from localhost ([::1]:41442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYBE-0007VU-BN for guile-bugs@m.gmane.org; Thu, 05 Jun 2014 09:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYBA-0007Uj-Ms for bug-guile@gnu.org; Thu, 05 Jun 2014 09:58:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsYB9-0005PI-Fe for bug-guile@gnu.org; Thu, 05 Jun 2014 09:58:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYB9-0005PE-Cx for bug-guile@gnu.org; Thu, 05 Jun 2014 09:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WsYB8-0005wr-GV for bug-guile@gnu.org; Thu, 05 Jun 2014 09:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 05 Jun 2014 13:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17485 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 17485-submit@debbugs.gnu.org id=B17485.140197667422855 (code B ref 17485); Thu, 05 Jun 2014 13:58:02 +0000 Original-Received: (at 17485) by debbugs.gnu.org; 5 Jun 2014 13:57:54 +0000 Original-Received: from localhost ([127.0.0.1]:45807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsYAv-0005wV-B6 for submit@debbugs.gnu.org; Thu, 05 Jun 2014 09:57:54 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:53631 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsYAo-0005wN-Je for 17485@debbugs.gnu.org; Thu, 05 Jun 2014 09:57:46 -0400 Original-Received: from localhost ([127.0.0.1]:60937 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYAn-0002pi-CP; Thu, 05 Jun 2014 09:57:41 -0400 Original-Received: by lola (Postfix, from userid 1000) id 1ADFCDF6B9; Thu, 5 Jun 2014 15:57:30 +0200 (CEST) In-Reply-To: <87vbsh6l6b.fsf@fencepost.gnu.org> (David Kastrup's message of "Wed, 04 Jun 2014 12:09:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7499 Archived-At: David Kastrup writes: > David Kastrup writes: > >>> Otherwise, this function looks good to me, but I'd prefer to give it a >>> new name and move it into list.c, rather than extending SRFI-1's >>> 'length+'. > > It's not an "extension" of SRFI-1's length+: it just does the same as > the SRFI-1 reference implementation. It is just a different choice of > working with unspecified behavior than yours. > >>> Hmm, coming up with names is hard. Maybe 'length*'? >> >> Given what cons* (and use of id* in syntax rules) does, the name seems >> inappropriate. length* would be a good name for >> >> (length* clist1 clist* ... ) >> >> returns the length of the shortest finite list in the given lists, #f >> if there is none. Which would be actually a rather nice building >> block to have for several srfi-1 functions and would basically not >> make us need length+ at all in its implementation. > > And that's actually the core of the argument: do we really want to offer > a "length+" that is at best marginally useful for srfi-1 itself? > > For a library design, that sounds a lot like "does not eat its own dog > food". Are we really doing users a favor by filling in the > "unspecified" corners of the srfi-1 in a manner not making for a > coherent whole? Here is another: if I make length* do the "length of shortest list" thing, it would be silly _not_ to use it in the multiple-list for-each, fold, map etc. So we again get in the situation that the respective functions would get "lax" in the multi-argument case since length*, if it were to be used in take-right, _has_ to be lax in the single-argument case, rendering its behavior again unacceptable for for-each/map/etc and thus rather pointless as a length* operator. I am not particularly interested in investing work into further patches each constituting several days of work getting thrown in the trash, so I=A0won't even bother making further proposals that can but fail to meet a set of mutually contradictory design criteria. --=20 David Kastrup