mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] make-eq-hash-table


From: Joe Marshall
Subject: Re: [MIT-Scheme-devel] make-eq-hash-table
Date: Sun, 20 Dec 2009 07:55:07 -0800

On Sun, Dec 20, 2009 at 12:59 AM, Taylor R Campbell <address@hidden> wrote:
>
> The only reason that this may not have bitten anyone before is that
> nobody has implemented any weak internment scheme for objects that are
> ever used as keys in eq hash tables -- and the other cases are highly
> unlikely to be encountered.

I think this is the place where we disagree.

It seems to me that a weak internment scheme should not be observably
different from a strong one in any way.  It should only be (potentially) more
memory efficient.  This implies that if weakly interned objects are used
as keys in a hash table, then the entries they map to must be preserved
under all circumstances.

A weak-key EQ hash table should not be observably different from a strong
one with regard to the put and get operations. It may be observably different
in the count and key-list operations, that is, inaccessible entries would be
allowed to drop out. If the user doesn't want this, he should
use an EQUAL hash table.


-- 
~jrm




reply via email to

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