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#17049: Further change ideas. Date: Sun, 30 Mar 2014 18:36:20 +0200 Message-ID: <87ppl3mynv.fsf@fencepost.gnu.org> References: <1395314582-22733-1-git-send-email-dak@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396197436 3167 80.91.229.3 (30 Mar 2014 16:37:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2014 16:37:16 +0000 (UTC) To: 17049@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Mar 30 18:37:10 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 1WUIjN-0005R1-1Q for guile-bugs@m.gmane.org; Sun, 30 Mar 2014 18:37:09 +0200 Original-Received: from localhost ([::1]:44937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUIjM-00070s-Jj for guile-bugs@m.gmane.org; Sun, 30 Mar 2014 12:37:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUIjH-0006y7-Pw for bug-guile@gnu.org; Sun, 30 Mar 2014 12:37:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUIjH-00088a-0M for bug-guile@gnu.org; Sun, 30 Mar 2014 12:37:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUIjG-00088U-Ro for bug-guile@gnu.org; Sun, 30 Mar 2014 12:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WUIjG-0000PY-3B for bug-guile@gnu.org; Sun, 30 Mar 2014 12:37:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1395314582-22733-1-git-send-email-dak@gnu.org> Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 30 Mar 2014 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17049 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 17049-submit@debbugs.gnu.org id=B17049.13961973971547 (code B ref 17049); Sun, 30 Mar 2014 16:37:01 +0000 Original-Received: (at 17049) by debbugs.gnu.org; 30 Mar 2014 16:36:37 +0000 Original-Received: from localhost ([127.0.0.1]:57230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUIir-0000Os-4T for submit@debbugs.gnu.org; Sun, 30 Mar 2014 12:36:37 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:47030) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUIin-0000Od-VW for 17049@debbugs.gnu.org; Sun, 30 Mar 2014 12:36:34 -0400 Original-Received: from localhost ([127.0.0.1]:54335 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUIin-0006ED-CQ for 17049@debbugs.gnu.org; Sun, 30 Mar 2014 12:36:33 -0400 Original-Received: by lola (Postfix, from userid 1000) id 71966E0870; Sun, 30 Mar 2014 18:36:20 +0200 (CEST) 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:7426 Archived-At: While it does not appear like this patch proposal is going anywhere for some reason, there is a further opportunity for change. One thing is to note that scm_srfi1_append_reverse_x does essentially the same thing but has a different doc string, the second argument non-optional and a different implementation that creates nonsense on some arguments and hangs on others: scheme@(guile-user)> (use-modules (srfi srfi-1)) scheme@(guile-user)> (append-reverse! (circular-list 1 2) '(3 4)) $2 = (4 3 1 2 . #-1#) scheme@(guile-user)> (append-reverse! (circular-list 1) (circular-list 2)) [hangs uninterruptibly...] It can also show somewhat inventive error messages: scheme@(guile-user)> (append-reverse! '(1 2 3 . 4) 5) ERROR: In procedure append-reverse!: ERROR: In procedure append-reverse!: Wrong type argument in position 1 (expecting list): 4 or even scheme@(guile-user)> (append-reverse! (circular-list 1 2 3) 5) ERROR: In procedure append-reverse!: ERROR: In procedure append-reverse!: Wrong type argument in position 1 (expecting list): 5 It is an obvious candidate to rerouting to reverse!. However, there is another difference apart from append-reverse! not really being all too robust against errors: scheme@(guile-user) [2]> (reverse! (circular-list 1 2 3) 5) ERROR: In procedure reverse!: ERROR: In procedure reverse!: Wrong type argument in position 1: (1 2 3 . #-2#) Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. Note that with reverse! the "(expecting list)" in the error message is absent because scm_wrong_type_arg instead of scm_wrong_type_arg_msg is employed in scm_reverse_x (directly after the patch, indirectly through SCM_VALIDATE_LIST before the patch). So if one wants to have identical error behavior, it would likely make sense to move to the somewhat more specific scm_wrong_type_arg_msg, possibly even for the whole of SCM_VALIDATE_LIST. Of course all this is water under the drawbridge if not even the original patch is going anywhere. -- David Kastrup