[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mapping.scm and hashx-remove!

From: Kevin Ryde
Subject: Re: mapping.scm and hashx-remove!
Date: Thu, 09 Oct 2003 07:16:43 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Marius Vollmer <address@hidden> writes:
> Right.  Can you write a test case for this and fix it?  That would be
> great!

I added some words to the todo file instead.  The functions taken by
hashx_remove seem sub-optimal.

  - hashx-remove!, corresponding to other hash*-remove! functions.

    scm_hashx_remove_x exists, but has never been documented, and
    might be non-functional (looks like it's missing "&closure" in the
    scm_hash_fn_remove_x call).

    Might want to think about the procedures taken.  Separate assoc
    and delete! suit existing such functions, but it's wasteful to
    traverse a bucket list once to see if an element exists, then
    again to delete it.  Think about maybe a function returning both a
    modified list and a flag indicating whether a delete was done.  Or
    maybe just returning the list tail of the target element.

  - mapping.scm hash-table-mapping-hooks uses hashx-create-handle,
    which doesn't exist.  Probably a typo for hashx-create-handle!,
    just wants to get a little test program to exercise it.
  - mapping.scm hash-table-mapping-hooks uses hashx-get-handle in its
    constructed delete-proc, which is probably meant to be
    hashx-remove!, if/when such a function exists.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]