From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#14792: Error in manual "(guile-2) Object Properties" Date: Tue, 16 Jul 2013 20:53:03 +0200 Message-ID: <87ppui2v74.fsf@gnu.org> References: <87ehbedwxt.fsf@fencepost.gnu.org> <87siztarok.fsf@tines.lan> <87wqp3mlkg.fsf@gnu.org> <87li563396.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1374000851 17011 80.91.229.3 (16 Jul 2013 18:54:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2013 18:54:11 +0000 (UTC) Cc: 14792@debbugs.gnu.org, David Kastrup To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jul 16 20:54:10 2013 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 1UzAO1-0001Ws-T6 for guile-bugs@m.gmane.org; Tue, 16 Jul 2013 20:54:10 +0200 Original-Received: from localhost ([::1]:57091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzAO1-00034Q-K6 for guile-bugs@m.gmane.org; Tue, 16 Jul 2013 14:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzANx-00033q-C0 for bug-guile@gnu.org; Tue, 16 Jul 2013 14:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzANv-0004cn-P2 for bug-guile@gnu.org; Tue, 16 Jul 2013 14:54:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzANv-0004ch-LW for bug-guile@gnu.org; Tue, 16 Jul 2013 14:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UzANu-0002Ox-ID for bug-guile@gnu.org; Tue, 16 Jul 2013 14:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 16 Jul 2013 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14792 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14792-submit@debbugs.gnu.org id=B14792.13740007939133 (code B ref 14792); Tue, 16 Jul 2013 18:54:02 +0000 Original-Received: (at 14792) by debbugs.gnu.org; 16 Jul 2013 18:53:13 +0000 Original-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 Original-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 Original-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) Original-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) Original-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) 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 In-Reply-To: <87li563396.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 11:59:01 -0400") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (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:7233 Archived-At: 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.