I hope this will be the final draft.
1. Integrate the R6RS condition system into the spec
2. Add examples to the spec
3. Add hash-table-add! and hash-table-replace! (see other thread)
4. Extend the hash table cursor interface with:
hash-table-cursor-for-key: Returns a cursor pointing at the entry for a particular key. (alternative name: hash-table-ref/cursor)
hash-table-cursor-value-set!: Set the value for the entry pointed to by a particular cursor
5. Remove one of the hash-table-keys/hash-table-keys-vector and hash-table-values/hash-table-values-vector procedures as redundant. I lean towards removing the list versions, since the vector versions have the advantage that they might be able to return in O(1) if they can reuse internal state. It seems strongly unlikely that the list versions could benefit from this. (Mike Sperber tells me he reckons R6RS’s equivalent procedures are allowed to do this, and the implementation is allowed to leave the hashtable in a broken state if the returned vectors are subsequently mutated.)
In fact, I think we could probably remove both – the only reason R6RS provides these is because they’re the only way to iterate over the hashtable in R6RS. But the potential efficiency win for when someone really needs vectors might be enough to keep them both.
And besides examples, it still needs a test suite. My attempt to create one today already uncovered some bugs in the sample implementation, which I am working through fixing.
John, comments on these proposals?
Daphne