[r6rs-discuss] immutable hash tables and eqv?

From: Alexander Kjeldaas <alexander.kjeldaas>
Date: Thu, 24 May 2007 18:06:41 +0200

I couldn't find a way to create an immutable hash table. Given that this is
not possible, this seems to indicate that hash-tables are inferior to a
library implementing hash-tables on top of records. Such a
hash-table-library can provide immutable hash-tables, and these immutable
hash-tables will have the ability to be eqv? even if they reside at
different locations in the store because they are immutable records.

Also, this language in the desciption of eqv? is a bit confusing for me:

[eqv? should return #f if...]
Obj1 and obj2 are mutable objects such as pairs, vectors,
strings, mutable records (library chapter 6), ports
(library section 8.2), and hashtables (library chapter
13) that denote distinct locations.

At first I thought this text implied that all pairs, vectors, strings,
mutable records and hash tables are mutable. I would prefer a clearer
description (like "Obj1 and obj2 are mutable objects of type ...") if this
is not true.


Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20070524/72175d99/attachment.htm
Received on Thu May 24 2007 - 12:06:41 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC