> Date: Tue Feb 7 20:23:41 2017 -0800
> From: Chris Hanson <org/chris-hanson/cph>
>
> Fix nasty bug: modifying a hash table could scramble its buckets.

This was intentional -- as the documentation notes, the procedure
passed to HASH-TABLE/MODIFY! is not allowed to use the hash table.
In contrast, SRFI 69 HASH-TABLE-UPDATE! does allow the procedure you
pass to use the table arbitrarily.

Note that even with your change, you can still screw yourself by,
e.g., removing the entry and re-entering it inside the procedure.  See
test-hash-table.scm for several screw cases that HASH-TABLE-UPDATE!
goes to the extra effort to avoid.

_______________________________________________
MIT-Scheme-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/mit-scheme-devel

Reply via email to