After writing some code to implement (srfi 146 hash) on top of SRFI 125 hash tables, and thinking about it a lot, I have come to the conclusion that for the purposes for which hashmaps were intended, hash tables are not satisfactory. Specifically, the only way to do pure update functions on hash tables is to copy the whole hash table before performing the mutation operations that SRFI 125 provides. SRFI 146 describes this as "rather inefficient" and I would change that to "grossly inefficient".
What's needed is a true persistent hash-based map. one that doesn't involve full copying for updating, any more than the red-black trees used by (srfi 146) do. An appropriate implementation would be a hash trie. However, I am not really up for providing a hash trie implementation, and I doubt if anyone else is either right now. Therefore I suggest that references to hashmaps and (srfi 146 hash) be removed from SRFI 146 and left for a possible later SRFI.
Comments?
--
With techies, I've generally found
If your arguments lose the first round
Make it rhyme, make it scan / Then you generally can
Make the same stupid point seem profound! --Jonathan Robie