[plt-scheme] likely 3.99.0.22 -> 3.99.0.23 incompatibility: hash tables
At Mon, 7 Apr 2008 15:31:43 -0600, Matthew Flatt wrote:
> Here's the current plan to deal with those problems:
>
> * Change `hash-table-get' to `table-ref'.
>
> [...]
I tried this, and it's ugly: `table' really is a bad name, and
abstracting over associative lists at the `scheme/base' layer seems to
be overkill.
The new plan is a simpler version of the old one, using "hash" instead
of "table":
* Change `hash-table-get' to `hash-ref'.
* Change hash-table-put!' to `hash-set!'.
* Change "hash-table" in other function names to just "hash":
`hash-table-count' -> `hash-count'.
* Add `hash-set' (no "!"), which takes an immutable hash table and
functionally produces an extended one. Note that `#hash()' and
`#hasheq()' become useful base cases for inductively building up a
table with `hash-set'.
* Add `hash-remove', the functional complement of `hash-remove!'.
* Add `for/hash', which builds an immutable hash table.
And as a separate step:
* Add a new `scheme/dict' library that provides `dict-ref', etc.
operations that abstract over the dictionary implementation, and
that can be extended to new datatypes using the `prop:dict'
structure-type property.
Matthew