unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Hartwig <mandyke@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 13022@debbugs.gnu.org
Subject: bug#13022: hash-table accessors no longer work on vectors
Date: Fri, 30 Nov 2012 09:52:39 +0800	[thread overview]
Message-ID: <CAN3veRdHwWdmLSxU-0vtVb2sLY=5j+V3u5heDfkbkZ0r5wiKAA@mail.gmail.com> (raw)
In-Reply-To: <87r4nc5frd.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

On 30 November 2012 04:13, Ludovic Courtès <ludo@gnu.org> wrote:
> I removed the faulty example from the doc, thanks!

Ok.  The attached patch cleans up some more references to this.

I did not find a mention in NEWS, although I see that the
functionality was removed in Jan 2011 and the commit indicates it was
deprecated prior to that.  [commit f0554ee]

Regards

[-- Attachment #2: 0001-doc-remove-more-references-to-hash-tables-as-vectors.patch --]
[-- Type: application/octet-stream, Size: 3016 bytes --]

From 497f5cce8d4d8730ccc4b55d53c5db704a91e722 Mon Sep 17 00:00:00 2001
From: Daniel Hartwig <mandyke@gmail.com>
Date: Fri, 30 Nov 2012 09:40:36 +0800
Subject: [PATCH] doc: remove more references to hash-tables-as-vectors

* doc/ref/api-compound.texi (Hash Tables): Update.
---
 doc/ref/api-compound.texi |   25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi
index ba2dc8e..be3d65f 100644
--- a/doc/ref/api-compound.texi
+++ b/doc/ref/api-compound.texi
@@ -3721,12 +3721,6 @@ search in constant time.  The drawback is that hash tables require a
 little bit more memory, and that you can not use the normal list
 procedures (@pxref{Lists}) for working with them.
 
-Guile provides two types of hashtables.  One is an abstract data type
-that can only be manipulated with the functions in this section.  The
-other type is concrete: it uses a normal vector with alists as
-elements.  The advantage of the abstract hash tables is that they will
-be automatically resized when they become too full or too empty.
-
 @menu
 * Hash Table Examples::         Demonstration of hash table usage.
 * Hash Table Reference::        Hash table procedure descriptions.
@@ -3831,19 +3825,12 @@ Hash tables are implemented as a vector indexed by a hash value formed
 from the key, with an association list of key/value pairs for each
 bucket in case distinct keys hash together.  Direct access to the
 pairs in those lists is provided by the @code{-handle-} functions.
-The abstract kind of hash tables hide the vector in an opaque object
-that represents the hash table, while for the concrete kind the vector
-@emph{is} the hashtable.
-
-When the number of table entries in an abstract hash table goes above
-a threshold, the vector is made larger and the entries are rehashed,
-to prevent the bucket lists from becoming too long and slowing down
-accesses.  When the number of entries goes below a threshold, the
-vector is shrunk to save space.
 
-A abstract hash table is created with @code{make-hash-table}.  To
-create a vector that is suitable as a hash table, use
-@code{(make-vector @var{size} '())}, for example.
+When the number of entries in a hash table goes above a threshold, the
+vector is made larger and the entries are rehashed, to prevent the
+bucket lists from becoming too long and slowing down accesses.  When the
+number of entries goes below a threshold, the vector is shrunk to save
+space.
 
 For the @code{hashx-} ``extended'' routines, an application supplies a
 @var{hash} function producing an integer index like @code{hashq} etc
@@ -3878,7 +3865,7 @@ addition to @code{hashq} etc below, include @code{symbol-hash}
 
 @sp 1
 @deffn {Scheme Procedure} make-hash-table [size]
-Create a new abstract hash table object, with an optional minimum
+Create a new hash table object, with an optional minimum
 vector @var{size}.
 
 When @var{size} is given, the table vector will still grow and shrink
-- 
1.7.10.4


  reply	other threads:[~2012-11-30  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 16:00 bug#13022: hash-table accessors no longer work on vectors Daniel Hartwig
2012-11-29 20:13 ` Ludovic Courtès
2012-11-30  1:52   ` Daniel Hartwig [this message]
2012-11-30 20:24     ` Ludovic Courtès

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='CAN3veRdHwWdmLSxU-0vtVb2sLY=5j+V3u5heDfkbkZ0r5wiKAA@mail.gmail.com' \
    --to=mandyke@gmail.com \
    --cc=13022@debbugs.gnu.org \
    --cc=ludo@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).