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: Taylor R Campbell
Subject: Re: [MIT-Scheme-devel] make-eq-hash-table
Date: Sun, 20 Dec 2009 20:46:08 -0500
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

   Date: Mon, 21 Dec 2009 00:37:10 +0000
   From: address@hidden

   Of course the response to this is that the obarray isn't intended
   to be used in this manner. It is not guaranteed to retain symbols
   and that it was simply an implementation detail that it happened to
   retain them. And user code should not assume that calling intern on
   a symbol will cause it to appear in the obarray.

   I argue the same is true of hash tables. User code should not
   assume that inserting a key/value pair in the table will cause the
   key to appear in the key-list.

Your last sentence is not the documented intent, and would severely
restrict the applicability of the hash table abstraction.  There are
cases in which that assumption is valid, and there are cases in which
that assumption is not valid.  In the case of the obarray (which is
not expressible using the runtime's hash table abstraction, of course,
because the hash table abstraction does not support key-strong,
datum-weak hash tables, which is what the obarray is), the assumption
is not valid.




reply via email to

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