[plt-scheme] likely 3.99.0.22 -> 3.99.0.23 incompatibility: hash tables

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Apr 7 20:37:00 EDT 2008

At Mon, 07 Apr 2008 17:54:19 -0400, Neil Van Dyke wrote:
> All the changes you list sound good to me.  Two minor questions of 
> rationale, perhaps worth documenting:
> 
> 1. Why do mutable hash tables *not* support the functional operations?  
> Of course mutable lists have supported functional "append" just as 
> immutable lists do, for example.

Immutable hash-table update will be constant time. (Well, O(lg n), but
the constant will be so small that it's effectively O(n).) Mutable
hash-table update would be O(n).

That's different from lists, where operating on the two kinds have the
same complexity, and I think it's a sever enough difference to
discourage the operation on mutable hash tables.

> 2. Why is the "hash-table-set" not the more generic "table-set"?

Yes, it should have been `table-set'.

Matthew



Posted on the users mailing list.