unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: 18223@debbugs.gnu.org
Subject: bug#18223: Duplicate of issue 14792
Date: Sat, 09 Aug 2014 11:46:42 +0200	[thread overview]
Message-ID: <878umy8071.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <1407505351-26741-1-git-send-email-dak@gnu.org>


This is actually a duplicate of issue 14792 which has been ignored for
over a year by now.

Please see <URL:http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14792#35>
for the reason the provided patch (namely discouraging the use of
numbers for object properties) is the only one making sense.

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

Guile and/or Scheme do not store the equivalence relation in the
hashtable itself, and user-definable hash functions may establish
arbitrary relations regarding key uniqueness that have no clear relation
to the object identity used by garbage collection.

-- 
David Kastrup





  reply	other threads:[~2014-08-09  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 13:42 bug#18223: [PATCH] Fix thinko concerning object property docs David Kastrup
2014-08-09  9:46 ` David Kastrup [this message]
2014-08-09 12:16   ` bug#18223: Duplicate of issue 14792 Nala Ginrut
2014-08-09 12:21     ` David Kastrup
2014-08-11  3:00   ` bug#14792: " Mark H Weaver
2014-08-09 10:20 ` bug#18223: And here's direct proof that the doc is wrong: David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878umy8071.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=18223@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).