From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#41354: equal? has no sensible code path for symbols Date: Wed, 27 May 2020 22:39:59 +0200 Message-ID: <875zchjen4.fsf@gnu.org> References: <87v9kuzvht.fsf@fencepost.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="49049"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 41354@debbugs.gnu.org To: David Kastrup Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed May 27 22:41:17 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1je2rV-000CgO-Ci for guile-bugs@m.gmane-mx.org; Wed, 27 May 2020 22:41:17 +0200 Original-Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1je2rT-00028A-Dz for guile-bugs@m.gmane-mx.org; Wed, 27 May 2020 16:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1je2rG-00026H-49 for bug-guile@gnu.org; Wed, 27 May 2020 16:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1je2rF-0001Er-QW for bug-guile@gnu.org; Wed, 27 May 2020 16:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1je2rF-0002as-NZ for bug-guile@gnu.org; Wed, 27 May 2020 16:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 27 May 2020 20:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41354 X-GNU-PR-Package: guile Original-Received: via spool by 41354-submit@debbugs.gnu.org id=B41354.15906120109889 (code B ref 41354); Wed, 27 May 2020 20:41:01 +0000 Original-Received: (at 41354) by debbugs.gnu.org; 27 May 2020 20:40:10 +0000 Original-Received: from localhost ([127.0.0.1]:50066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je2qP-0002ZR-Rs for submit@debbugs.gnu.org; Wed, 27 May 2020 16:40:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je2qN-0002Z6-Sr for 41354@debbugs.gnu.org; Wed, 27 May 2020 16:40:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44841) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1je2qI-0000o9-IU for 41354@debbugs.gnu.org; Wed, 27 May 2020 16:40:02 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37088 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1je2qG-0001o1-Pd; Wed, 27 May 2020 16:40:01 -0400 In-Reply-To: <87v9kuzvht.fsf@fencepost.gnu.org> (David Kastrup's message of "Sun, 17 May 2020 12:49:50 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9779 Archived-At: Hi David, David Kastrup skribis: > In Scheme, symbols can be compared using eq? for equality. However, > since they have garbage-collected content attached, they do not meet the > predicate SCM_IMP in the short-circuit evaluation at the start of equal? > This means that unequal symbols compared using equal? fall through a > whole bunch of tests and end up in a general structural comparison > comparing their underlying string names. =E2=80=98equal?=E2=80=99 starts by checking for eq-ness, which LGTM: SCM scm_equal_p (SCM x, SCM y) #define FUNC_NAME s_scm_i_equal_p { SCM_CHECK_STACK; tailrecurse: SCM_TICK; if (scm_is_eq (x, y)) return SCM_BOOL_T; Or were you referring to something else? Thanks, Ludo=E2=80=99.