[Top][All Lists]

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

Re: functional hash operations

From: Marius Vollmer
Subject: Re: functional hash operations
Date: 01 Jan 2003 22:47:59 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden (Paul Jarc) writes:

> Sometimes it would be useful to have functional operations on hashes:
> "make a copy of this hash which also has this additional entry", etc.
> It would also be nice to make such copies share as much memory as
> possible with the original hash.  This is easy enough to do by taking
> advantage of the knowledge of the representation of hashes as vectors
> of alists, but is it safe to assume that representation?  Or might the
> representation change in the future?

The hash table implementation should be considered opaque (except for
the handles) and if you want to play it safe, you should only use the
procedures from the reference manual with them.

Would it be workable to implement functional hash tables from scratch,
without basing them on the builtin implementation?  There are the
functions 'hash', 'hashv', and 'hashq' to help with computing hash
values for Scheme objects.

Or, as Thien-Thi has said, you can lobby the Guile developers to
include the things you need.  A working patch (also for the manual) is
quite convincing.

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

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