GNU bug report logs - #10621
Incorrect usage of hash procedures in (ice-9 mapping)

Previous Next

Package: guile;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Fri, 27 Jan 2012 08:28:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10621 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Hartwig <mandyke <at> gmail.com>
To: 10621 <at> debbugs.gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>
Subject: Re: Bug#10621: Incorrect usage of hash procedures in (ice-9 mapping)
Date: Wed, 28 Nov 2012 23:56:43 +0800
Mark H Weaver <mhw <at> netris.org> wrote:
> ice-9/mapping.scm:97:48: warning: possibly wrong number of arguments to `hashx-get-handle'
> ice-9/mapping.scm:94:48: warning: possibly unbound variable `hashx-create-handle'

This module is quite ancient, and, in addition to these warnings, has
not worked for some time.  Some logic errors in hash-table-mapping
(detecting len) and mapping-ref (detecting dflt), for example.  Since
noone has reported the brokenness I guess that means the module has no
users.

There is no practical way to accomodate a separate delete-proc, as
hashx-remove! uses assoc.  The use of delq! and others to convey the
intended delete semantics is incorrect, since mapping-remove! actually
presents and expects a different interface, that of hashq-remove!.

There is no documentation.

It seems the main purpose of this module is to associate hash and assoc
procedures with a hash table, and so provide a single set of accessors
(rather than one for each of hashq, hashv, etc.).  This is more-or-less
handled by both srfi-69 and rnrs hashtables.

A short module, it is not hard to fix, though given all of the above it
makes sense to simply remove it.




This bug report was last modified 12 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.