From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.lisp.guile.bugs Subject: bug#21855: eq? Date: Sun, 8 Nov 2015 14:38:35 +0100 Message-ID: <20151108133835.GA11324@tuxteam.de> References: <87r3k2ezjr.fsf@posteo.org> <20151108102323.GA5299@tuxteam.de> <87pozkoby5.fsf@posteo.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed X-Trace: ger.gmane.org 1446992061 21798 80.91.229.3 (8 Nov 2015 14:14:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Nov 2015 14:14:21 +0000 (UTC) Cc: 21855@debbugs.gnu.org To: Atticus Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Nov 08 15:14:12 2015 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 1ZvQjT-0007NE-7k for guile-bugs@m.gmane.org; Sun, 08 Nov 2015 15:14:11 +0100 Original-Received: from localhost ([::1]:47587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvQjS-0003NN-BB for guile-bugs@m.gmane.org; Sun, 08 Nov 2015 09:14:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvQjO-0003N5-0L for bug-guile@gnu.org; Sun, 08 Nov 2015 09:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvQjK-0005JE-R5 for bug-guile@gnu.org; Sun, 08 Nov 2015 09:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvQjK-0005JA-O4 for bug-guile@gnu.org; Sun, 08 Nov 2015 09:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZvQjK-00032r-9L for bug-guile@gnu.org; Sun, 08 Nov 2015 09:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: tomas@tuxteam.de Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 08 Nov 2015 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21855 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21855-submit@debbugs.gnu.org id=B21855.144699200711654 (code B ref 21855); Sun, 08 Nov 2015 14:14:02 +0000 Original-Received: (at 21855) by debbugs.gnu.org; 8 Nov 2015 14:13:27 +0000 Original-Received: from localhost ([127.0.0.1]:57366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvQik-00031t-Qk for submit@debbugs.gnu.org; Sun, 08 Nov 2015 09:13:27 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:42377 helo=tomasium.tuxteam.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvQii-00031k-9k for 21855@debbugs.gnu.org; Sun, 08 Nov 2015 09:13:25 -0500 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1ZvQB2-00032V-4n; Sun, 08 Nov 2015 14:38:36 +0100 In-Reply-To: <87pozkoby5.fsf@posteo.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 208.118.235.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:7884 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Nov 08, 2015 at 02:30:42PM +0100, Atticus wrote: [...] > Yes you are right that the implementation may treat it as non #f if both > arguments refer to the same object. In r5rs (and also r6rs) (eq? '(a) > '(a)) is unspecified (r5rs, page 19) and thus implementation dependant > but I don't think the behaviour of eq? is consistent in guile. My hunch is that it *can't* be consistent (see below) > As I said > (eq? '(a b) '(a b)) on its own returns #f and imho there is no reason why eq? > inside a procedure (in this example in 'multirember') should behave > different, since the '(a b) in the second argument does not refer to the > '(a b) of the first argument. Modulo vagaries of the optimizer :-) > Since it's not clear if this is a "real" bug, perhaps a further > discussion at guile-user@gnu.org would be better. What is the > recommended proceeding in such a case? A reply with the pseudo-header > "X-Debbugs-CC: guile-user@gnu.org"? Or is that not necessary and a > simple mail to guile-user to discuss this topic is sufficient? Note that I'm not authoritative in this questions, so you'll have to wait on someone with more knowledge than me for a more definiteve answer. But as far as I can gather, those things can get caught in a common subexpression elimination[1] step, and the results will depend on the current optimization strategies. That's why r5rs is vague about that. They (rightfully) don't want to shut off those (in some cases vital) optimizations. The take away (for me, at least) is "use eq? just for symbols", at least unless you know what you are doing. [1] regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlY/UFsACgkQBcgs9XrR2kaLQwCeKByrAN8ODfbCkIqRt8RMEpNL 9fcAmwTvngBuJ4qSlybyu/miPX8LROiS =or0E -----END PGP SIGNATURE-----