Date: Sun, 20 Dec 2009 03:34:53 -0500
From: Taylor R Campbell <[email protected]>
Date: Sun, 20 Dec 2009 00:30:22 -0800
From: Joe Marshall <[email protected]>
What would happen if the modifier procedure added or deleted an element
from the table? I'm thinking about the case where we've found the cell
pointing at the entry, but the modifier code causes a rehash and the
bucket links are rethreaded while we're trying to walk them.
That's a screw case that blocking interrupts doesn't change. The
modifier procedure is not supposed to update the table.
It occurs to me, though, that while HASH-TABLE/MODIFY! is not
documented, HASH-TABLE-UPDATE! is, and as a consequence of what I said
above, our implementation of it does not conform to the specification
of HASH-TABLE-UPDATE! in SRFI 69, which does not prohibit editing the
hash table in <procedure> and says that
(HASH-TABLE-UPDATE! <hash-table> <key> <procedure> <default>)
is semantically equivalent to
(HASH-TABLE-SET!
<hash-table>
<key>
(<procedure> (HASH-TABLE-REF <hash-table> <key> <default>))),
modulo duplicate evaluation of arguments. So maybe we need to change
our definition of HASH-TABLE-UPDATE!, too.
_______________________________________________
MIT-Scheme-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/mit-scheme-devel