From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 14:04:04 2013 Received: (at submit) by debbugs.gnu.org; 4 Jul 2013 18:04:05 +0000 Received: from localhost ([127.0.0.1]:57814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uunsy-0002VK-8b for submit@debbugs.gnu.org; Thu, 04 Jul 2013 14:04:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49371) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uunsv-0002Uo-MH for submit@debbugs.gnu.org; Thu, 04 Jul 2013 14:04:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uunsp-0002sB-Ec for submit@debbugs.gnu.org; Thu, 04 Jul 2013 14:03:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.2 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uunsp-0002s7-Bs for submit@debbugs.gnu.org; Thu, 04 Jul 2013 14:03:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uunso-0006jo-9T for bug-guile@gnu.org; Thu, 04 Jul 2013 14:03:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uunsn-0002ri-ET for bug-guile@gnu.org; Thu, 04 Jul 2013 14:03:54 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uunsn-0002re-BH for bug-guile@gnu.org; Thu, 04 Jul 2013 14:03:53 -0400 Received: from localhost ([127.0.0.1]:37539 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uunsm-0001Fu-Ql for bug-guile@gnu.org; Thu, 04 Jul 2013 14:03:53 -0400 Received: by lola (Postfix, from userid 1000) id D1E192007D0; Thu, 4 Jul 2013 20:03:42 +0200 (CEST) From: David Kastrup To: bug-guile@gnu.org Subject: Error in manual "(guile-2) Object Properties" Date: Thu, 04 Jul 2013 20:03:42 +0200 Message-ID: <87ehbedwxt.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) The manual states in "Object Properties": A single object property created by `make-object-property' can associate distinct property values with all Scheme values that are distinguishable by `eq?' (including, for example, integers). Integers are not documented to be reliably distinguishable by eq? (which means that equal integers might not be eq). So something seems wrong in that description. Either integer values can _not_ be given properties reliably, or the above needs to specify "distinguishable by `eqv?'" or whatever else may be the underlying reality. -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 05 12:38:13 2013 Received: (at 14792) by debbugs.gnu.org; 5 Jul 2013 16:38:13 +0000 Received: from localhost ([127.0.0.1]:60551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uv91Q-0004rD-HR for submit@debbugs.gnu.org; Fri, 05 Jul 2013 12:38:12 -0400 Received: from world.peace.net ([96.39.62.75]:46322 ident=hope1) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uv91O-0004r5-UH for 14792@debbugs.gnu.org; Fri, 05 Jul 2013 12:38:11 -0400 Received: from 209-6-120-240.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com ([209.6.120.240] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Uv91I-0000Lz-Gr; Fri, 05 Jul 2013 12:38:04 -0400 From: Mark H Weaver To: David Kastrup Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> Date: Fri, 05 Jul 2013 12:37:47 -0400 In-Reply-To: <87ehbedwxt.fsf@fencepost.gnu.org> (David Kastrup's message of "Thu, 04 Jul 2013 20:03:42 +0200") Message-ID: <87siztarok.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi David, David Kastrup writes: > The manual states in "Object Properties": > > A single object property created by `make-object-property' can > associate distinct property values with all Scheme values that are > distinguishable by `eq?' (including, for example, integers). > > Integers are not documented to be reliably distinguishable by eq? (which > means that equal integers might not be eq). Indeed, good point! I think we should change object-properties to use 'eqv?' hash operations instead of 'eq?'. The only advantage to 'eq?' is a marginal efficiency benefit, but that's no doubt lost in the noise, not only from the hash table operations but from the use of fat mutexes. The only functional difference between Guile's 'eq?' and 'eqv?' is that 'eq?' is not reliable on numbers. Our manual has been telling people for years that integers can be used as keys for object properties. Therefore, we should make it so. IMO, anyway. What do other people think? Mark From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 17:21:26 2013 Received: (at 14792) by debbugs.gnu.org; 6 Jul 2013 21:21:26 +0000 Received: from localhost ([127.0.0.1]:35505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvZv3-0006Jx-Rj for submit@debbugs.gnu.org; Sat, 06 Jul 2013 17:21:26 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:37758) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvZv0-0006Jl-Q1 for 14792@debbugs.gnu.org; Sat, 06 Jul 2013 17:21:23 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7B603F88; Sat, 6 Jul 2013 23:21:20 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3X7W4lOfzZZK; Sat, 6 Jul 2013 23:21:20 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id F0CA7B37; Sat, 6 Jul 2013 23:21:19 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> Date: Sat, 06 Jul 2013 23:21:19 +0200 In-Reply-To: <87siztarok.fsf@tines.lan> (Mark H. Weaver's message of "Fri, 05 Jul 2013 12:37:47 -0400") Message-ID: <87wqp3mlkg.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, David Kastrup X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Mark H Weaver skribis: > David Kastrup writes: > >> The manual states in "Object Properties": >> >> A single object property created by `make-object-property' can >> associate distinct property values with all Scheme values that are >> distinguishable by `eq?' (including, for example, integers). >> >> Integers are not documented to be reliably distinguishable by eq? (which >> means that equal integers might not be eq). > > Indeed, good point! > > I think we should change object-properties to use 'eqv?' hash operations > instead of 'eq?'. The only advantage to 'eq?' is a marginal efficiency > benefit, but that's no doubt lost in the noise, not only from the hash > table operations but from the use of fat mutexes. > > The only functional difference between Guile's 'eq?' and 'eqv?' is that > 'eq?' is not reliable on numbers. Our manual has been telling people > for years that integers can be used as keys for object properties. > Therefore, we should make it so. IMO, anyway. > > What do other people think? Associating object properties with numbers doesn=E2=80=99t seem useful to m= e, so my inclination would be to fix the manual, FWIW. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 11:59:30 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 15:59:30 +0000 Received: from localhost ([127.0.0.1]:58667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uz7ez-0004dJ-Td for submit@debbugs.gnu.org; Tue, 16 Jul 2013 11:59:30 -0400 Received: from world.peace.net ([96.39.62.75]:53870 ident=hope0) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uz7ex-0004cz-RV for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 11:59:28 -0400 Received: from 209-6-120-240.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com ([209.6.120.240] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Uz7eq-000289-2O; Tue, 16 Jul 2013 11:59:20 -0400 From: Mark H Weaver To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> Date: Tue, 16 Jul 2013 11:59:01 -0400 In-Reply-To: <87wqp3mlkg.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 06 Jul 2013 23:21:19 +0200") Message-ID: <87li563396.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, David Kastrup X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi Ludovic, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >> David Kastrup writes: >> >>> The manual states in "Object Properties": >>> >>> A single object property created by `make-object-property' can >>> associate distinct property values with all Scheme values that are >>> distinguishable by `eq?' (including, for example, integers). >>> >>> Integers are not documented to be reliably distinguishable by eq? (which >>> means that equal integers might not be eq). >> >> Indeed, good point! >> >> I think we should change object-properties to use 'eqv?' hash operations >> instead of 'eq?'. The only advantage to 'eq?' is a marginal efficiency >> benefit, but that's no doubt lost in the noise, not only from the hash >> table operations but from the use of fat mutexes. >> >> The only functional difference between Guile's 'eq?' and 'eqv?' is that >> 'eq?' is not reliable on numbers. Our manual has been telling people >> for years that integers can be used as keys for object properties. >> Therefore, we should make it so. IMO, anyway. >> >> What do other people think? > > Associating object properties with numbers doesn=E2=80=99t seem useful to= me, so > my inclination would be to fix the manual, FWIW. I can easily think of many possible uses for this, e.g. for memoizing unary numeric functions, associating application-specific data structures with file descriptors or array indices, etc. Regardless, our manual has been telling people they could do this for a long time. To make matters worse, those who have tried using object-properties have likely observed that it works as advertised. They probably don't realize that it will silently fail for large integers. 'eqv?' is Scheme's fundamental "operational equivalence" predicate. 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that fails in surprising ways. No _correct_ program is ever broken by making 'eq?' an alias to 'eqv?'. Many programs contain subtle bugs because of their inappropriate use of 'eq?'. What's the argument on the other side? Is there a compelling reason to use 'eq?' instead of 'eqv?' for object properties? Regards, Mark From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 14:46:43 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 18:46:43 +0000 Received: from localhost ([127.0.0.1]:58947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAGo-00029N-8N for submit@debbugs.gnu.org; Tue, 16 Jul 2013 14:46:43 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57779 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAGm-00029F-78 for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 14:46:40 -0400 Received: from localhost ([127.0.0.1]:36850 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzAGl-0007lv-6j; Tue, 16 Jul 2013 14:46:39 -0400 Received: by lola (Postfix, from userid 1000) id D69C4EADBF; Tue, 16 Jul 2013 20:46:29 +0200 (CEST) From: David Kastrup To: Mark H Weaver Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> Date: Tue, 16 Jul 2013 20:46:29 +0200 In-Reply-To: <87li563396.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 11:59:01 -0400") Message-ID: <877ggq9wca.fsf@fencepost.gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Mark H Weaver writes: > I can easily think of many possible uses for this, e.g. for memoizing > unary numeric functions, associating application-specific data > structures with file descriptors or array indices, etc. > > Regardless, our manual has been telling people they could do this for a > long time. To make matters worse, those who have tried using > object-properties have likely observed that it works as advertised. > They probably don't realize that it will silently fail for large > integers. Fixing the documentation will not change the behavior. So they are not worse off than before. > 'eqv?' is Scheme's fundamental "operational equivalence" predicate. > 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that > fails in surprising ways. No _correct_ program is ever broken by making > 'eq?' an alias to 'eqv?'. Many programs contain subtle bugs because of > their inappropriate use of 'eq?'. > > What's the argument on the other side? Is there a compelling reason to > use 'eq?' instead of 'eqv?' for object properties? object identity is checked by eq? and is conceptually different from value equality. When calling a thing an "object property", it is not helpful when it does not behave like one. -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 14:53:13 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 18:53:13 +0000 Received: from localhost ([127.0.0.1]:58951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAN6-0002NE-QN for submit@debbugs.gnu.org; Tue, 16 Jul 2013 14:53:13 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:57666) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAN1-0002Mw-37 for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 14:53:08 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 18AC7FF3; Tue, 16 Jul 2013 20:53:05 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lwc7EFowaelo; Tue, 16 Jul 2013 20:53:05 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6187FCC9; Tue, 16 Jul 2013 20:53:04 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Messidor an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Tue, 16 Jul 2013 20:53:03 +0200 In-Reply-To: <87li563396.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 11:59:01 -0400") Message-ID: <87ppui2v74.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, David Kastrup X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Mark H Weaver skribis: >> >>> David Kastrup writes: >>> >>>> The manual states in "Object Properties": >>>> >>>> A single object property created by `make-object-property' can >>>> associate distinct property values with all Scheme values that are >>>> distinguishable by `eq?' (including, for example, integers). >>>> >>>> Integers are not documented to be reliably distinguishable by eq? (whi= ch >>>> means that equal integers might not be eq). >>> >>> Indeed, good point! >>> >>> I think we should change object-properties to use 'eqv?' hash operations >>> instead of 'eq?'. The only advantage to 'eq?' is a marginal efficiency >>> benefit, but that's no doubt lost in the noise, not only from the hash >>> table operations but from the use of fat mutexes. >>> >>> The only functional difference between Guile's 'eq?' and 'eqv?' is that >>> 'eq?' is not reliable on numbers. Our manual has been telling people >>> for years that integers can be used as keys for object properties. >>> Therefore, we should make it so. IMO, anyway. >>> >>> What do other people think? >> >> Associating object properties with numbers doesn=E2=80=99t seem useful t= o me, so >> my inclination would be to fix the manual, FWIW. > > I can easily think of many possible uses for this, e.g. for memoizing > unary numeric functions, associating application-specific data > structures with file descriptors or array indices, etc. [...] > What's the argument on the other side? Is there a compelling reason to > use 'eq?' instead of 'eqv?' for object properties? The argument would be the =E2=80=9Cugly efficiency hack=E2=80=9D. But I hear your argument, and I=E2=80=99m fine with changing this according= ly. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 15:00:03 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 19:00:04 +0000 Received: from localhost ([127.0.0.1]:58960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzATh-0002dk-Bt for submit@debbugs.gnu.org; Tue, 16 Jul 2013 15:00:02 -0400 Received: from world.peace.net ([96.39.62.75]:54144 ident=hope7) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzATe-0002dR-8n for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 14:59:58 -0400 Received: from 209-6-120-240.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com ([209.6.120.240] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UzATX-00034c-AW; Tue, 16 Jul 2013 14:59:51 -0400 From: Mark H Weaver To: David Kastrup Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> <877ggq9wca.fsf@fencepost.gnu.org> Date: Tue, 16 Jul 2013 14:59:28 -0400 In-Reply-To: <877ggq9wca.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 16 Jul 2013 20:46:29 +0200") Message-ID: <874nbu2uwf.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi David, David Kastrup writes: > Mark H Weaver writes: > >> 'eqv?' is Scheme's fundamental "operational equivalence" predicate. >> 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that >> fails in surprising ways. No _correct_ program is ever broken by making >> 'eq?' an alias to 'eqv?'. Many programs contain subtle bugs because of >> their inappropriate use of 'eq?'. >> >> What's the argument on the other side? Is there a compelling reason to >> use 'eq?' instead of 'eqv?' for object properties? > > object identity is checked by eq? and is conceptually different from > value equality. The Scheme standards don't support your view. The _only_ difference between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and characters, whereas 'eq?' is unspecified for those types. Numbers and characters do not have any notion of "object identity", apart from operational equivalence. For all values where "object identity" makes any sense at all, 'eqv?' does what you want. Regards, Mark From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 15:30:55 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 19:30:56 +0000 Received: from localhost ([127.0.0.1]:58979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAxb-0003hJ-1U for submit@debbugs.gnu.org; Tue, 16 Jul 2013 15:30:55 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58636 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAxY-0003hB-Qi for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 15:30:53 -0400 Received: from localhost ([127.0.0.1]:37709 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzAxX-00066i-85; Tue, 16 Jul 2013 15:30:51 -0400 Received: by lola (Postfix, from userid 1000) id D0CC8EADBF; Tue, 16 Jul 2013 21:30:50 +0200 (CEST) From: David Kastrup To: Mark H Weaver Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> <877ggq9wca.fsf@fencepost.gnu.org> <874nbu2uwf.fsf@tines.lan> Date: Tue, 16 Jul 2013 21:30:50 +0200 In-Reply-To: <874nbu2uwf.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 14:59:28 -0400") Message-ID: <87y5968fpx.fsf@fencepost.gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Mark H Weaver writes: > Hi David, > > David Kastrup writes: > >> Mark H Weaver writes: >> >>> 'eqv?' is Scheme's fundamental "operational equivalence" predicate. >>> 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that >>> fails in surprising ways. No _correct_ program is ever broken by making >>> 'eq?' an alias to 'eqv?'. Many programs contain subtle bugs because of >>> their inappropriate use of 'eq?'. >>> >>> What's the argument on the other side? Is there a compelling reason to >>> use 'eq?' instead of 'eqv?' for object properties? >> >> object identity is checked by eq? and is conceptually different from >> value equality. > > The Scheme standards don't support your view. The _only_ difference > between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and > characters, whereas 'eq?' is unspecified for those types. And why would that be if numbers were proper objects? The difference is _exactly_ there because they aren't. > Numbers and characters do not have any notion of "object identity", > apart from operational equivalence. Which is why it does not make a lot of sense to assign "object properties" to them. -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 15:52:50 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 19:52:50 +0000 Received: from localhost ([127.0.0.1]:59004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzBIo-0004UF-8b for submit@debbugs.gnu.org; Tue, 16 Jul 2013 15:52:50 -0400 Received: from world.peace.net ([96.39.62.75]:54223 ident=hope8) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzBIm-0004U4-5r for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 15:52:48 -0400 Received: from 209-6-120-240.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com ([209.6.120.240] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UzBIe-0003IN-Mp; Tue, 16 Jul 2013 15:52:40 -0400 From: Mark H Weaver To: David Kastrup Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> <877ggq9wca.fsf@fencepost.gnu.org> <874nbu2uwf.fsf@tines.lan> <87y5968fpx.fsf@fencepost.gnu.org> Date: Tue, 16 Jul 2013 15:52:23 -0400 In-Reply-To: <87y5968fpx.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 16 Jul 2013 21:30:50 +0200") Message-ID: <87vc4a1dvs.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) David Kastrup writes: > Mark H Weaver writes: > >> David Kastrup writes: >> >>> Mark H Weaver writes: >>> >>> object identity is checked by eq? and is conceptually different from >>> value equality. >> >> The Scheme standards don't support your view. The _only_ difference >> between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and >> characters, whereas 'eq?' is unspecified for those types. > > And why would that be if numbers were proper objects? The difference is > _exactly_ there because they aren't. I don't know what you mean by "proper objects". I guess maybe you mean "objects with identity". >> Numbers and characters do not have any notion of "object identity", >> apart from operational equivalence. > > Which is why it does not make a lot of sense to assign "object > properties" to them. I understand that in the dominant "object oriented" programming communities of today, the word "object" usually implies mutability and identity, but the Scheme standards use the term differently. In the Scheme standards, the word "object" is synonymous with "value". R5RS section 1.1 states "Types are associated with values (also called objects) rather than with variables." Furthermore, R6RS consistently calls numbers "objects", even though they lack "object identity" in the sense that you mean. Mark From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 16:01:25 2013 Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 20:01:25 +0000 Received: from localhost ([127.0.0.1]:59010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzBR6-0004lp-6u for submit@debbugs.gnu.org; Tue, 16 Jul 2013 16:01:24 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59285 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzBR2-0004lQ-GB for 14792@debbugs.gnu.org; Tue, 16 Jul 2013 16:01:22 -0400 Received: from localhost ([127.0.0.1]:38357 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzBR1-00089B-Cy; Tue, 16 Jul 2013 16:01:19 -0400 Received: by lola (Postfix, from userid 1000) id E12FAEADBF; Tue, 16 Jul 2013 22:01:18 +0200 (CEST) From: David Kastrup To: Mark H Weaver Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties" References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> <877ggq9wca.fsf@fencepost.gnu.org> <874nbu2uwf.fsf@tines.lan> <87y5968fpx.fsf@fencepost.gnu.org> <87vc4a1dvs.fsf@tines.lan> Date: Tue, 16 Jul 2013 22:01:18 +0200 In-Reply-To: <87vc4a1dvs.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 15:52:23 -0400") Message-ID: <87txju8eb5.fsf@fencepost.gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Mark H Weaver writes: > David Kastrup writes: > >> Mark H Weaver writes: >> >>> David Kastrup writes: >>> >>>> Mark H Weaver writes: >>>> >>>> object identity is checked by eq? and is conceptually different from >>>> value equality. >>> >>> The Scheme standards don't support your view. The _only_ difference >>> between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and >>> characters, whereas 'eq?' is unspecified for those types. >> >> And why would that be if numbers were proper objects? The difference is >> _exactly_ there because they aren't. > > I don't know what you mean by "proper objects". I guess maybe you mean > "objects with identity". > >>> Numbers and characters do not have any notion of "object identity", >>> apart from operational equivalence. >> >> Which is why it does not make a lot of sense to assign "object >> properties" to them. > > I understand that in the dominant "object oriented" programming > communities of today, the word "object" usually implies mutability and > identity, but the Scheme standards use the term differently. > > In the Scheme standards, the word "object" is synonymous with "value". > R5RS section 1.1 states "Types are associated with values (also called > objects) rather than with variables." Furthermore, R6RS consistently > calls numbers "objects", even though they lack "object identity" in the > sense that you mean. Well, eq?/eqv? are an inheritance from Lisp's eq/eql. If there is no clear conceptual difference any more, it would seem like a mistake to keep two different operators around. -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 17:20:10 2013 Received: (at 14792) by debbugs.gnu.org; 27 Jul 2013 21:20:10 +0000 Received: from localhost ([127.0.0.1]:53342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3BuL-0000oe-9M for submit@debbugs.gnu.org; Sat, 27 Jul 2013 17:20:09 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46366 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3BuG-0000oM-NY for 14792@debbugs.gnu.org; Sat, 27 Jul 2013 17:20:05 -0400 Received: from localhost ([127.0.0.1]:53673 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3BuG-0000UA-4d for 14792@debbugs.gnu.org; Sat, 27 Jul 2013 17:20:04 -0400 Received: by lola (Postfix, from userid 1000) id E3886EAC2A; Sat, 27 Jul 2013 23:19:53 +0200 (CEST) From: David Kastrup To: 14792@debbugs.gnu.org Subject: Actually, this discussion is moot Date: Sat, 27 Jul 2013 23:19:53 +0200 Message-ID: <87k3kbbszq.fsf@fencepost.gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 14792 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.5 (------) Object properties are implemented via key-weak hash tables and those only support eq? as hash equality in a reliable way. I actually can't determine how key-weak hash tables would deal with immediate Scheme values: will they never get released, or will they get released immediately? >From reading the documentation, I'd lean towards guessing the latter (as for immediate Scheme values, there _never_ is a remaining reference). That would likely make for some surprises to people, while the other option would be good for memory leaks. Either way, numbers seem like a bad idea for use in key-weak hash tables. -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 10 09:06:00 2014 Received: (at control) by debbugs.gnu.org; 10 Aug 2014 13:06:00 +0000 Received: from localhost ([127.0.0.1]:37115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGSox-0008EW-5P for submit@debbugs.gnu.org; Sun, 10 Aug 2014 09:05:59 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:53317 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGSou-0008EN-DY for control@debbugs.gnu.org; Sun, 10 Aug 2014 09:05:57 -0400 Received: from localhost ([127.0.0.1]:60624 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGSot-0006n8-Or for control@debbugs.gnu.org; Sun, 10 Aug 2014 09:05:55 -0400 Received: by lola (Postfix, from userid 1000) id 0ECC8E060B; Sun, 10 Aug 2014 15:05:32 +0200 (CEST) From: David Kastrup To: control@debbugs.gnu.org Subject: none Date: Sun, 10 Aug 2014 15:05:32 +0200 Message-ID: <87d2c87aw3.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) merge 18223 14792 thankyou -- David Kastrup From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 10 23:01:36 2014 Received: (at 14792) by debbugs.gnu.org; 11 Aug 2014 03:01:36 +0000 Received: from localhost ([127.0.0.1]:38220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGfrb-0001Kc-PG for submit@debbugs.gnu.org; Sun, 10 Aug 2014 23:01:35 -0400 Received: from world.peace.net ([96.39.62.75]:41001 ident=hope3) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGfrY-0001KH-HG; Sun, 10 Aug 2014 23:01:33 -0400 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XGfrR-0001uf-Ap; Sun, 10 Aug 2014 23:01:25 -0400 From: Mark H Weaver To: David Kastrup Subject: Re: bug#18223: Duplicate of issue 14792 References: <1407505351-26741-1-git-send-email-dak@gnu.org> <878umy8071.fsf@fencepost.gnu.org> Date: Sun, 10 Aug 2014 23:00:37 -0400 In-Reply-To: <878umy8071.fsf@fencepost.gnu.org> (David Kastrup's message of "Sat, 09 Aug 2014 11:46:42 +0200") Message-ID: <87r40nraqy.fsf@yeeloong.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14792 Cc: 14792@debbugs.gnu.org, 18223@debbugs.gnu.org, request@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) merge 18223 14792 close 18223 close 14792 thanks David Kastrup writes: > Here is the rationale in code: object properties are implemented via > key-weak hash tables, and weak hash tables will not work with eqv? as > equivalence since key-weakness is related to garbage collection which > cannot consider anything but eq?-equivalence. > > scheme@(guile-user)> (define x (make-weak-key-hash-table)) > scheme@(guile-user)> (hashv-set! x 100000000000000000000 #t) > $6 = #t > scheme@(guile-user)> (gc) > scheme@(guile-user)> (hashv-ref x 100000000000000000000) > $7 = #f Indeed, you are right. I added a proper commit message to your patch, and have applied it to the stable-2.0 branch. I'm closing both bugs. Thanks! Mark From unknown Fri Aug 15 04:05:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 08 Sep 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator