System`Utilities`HashTable is conceptually a lot like an
Association but it has the pretty phenomenal (for Mathematica) property that it's properly mutable. What I mean is that if we have a hash-table and bind it to a variable, assign it to a new variable, and mutate it there, we get the changes showing up on our original hash-table:
ht = System`Utilities`HashTable System`Utilities`HashTable["<" 0 ">"] b = ht; System`Utilities`HashTableAdd[ht, "key", val]; ht System`Utilities`HashTable["<" 1 ">"]
Association copies itself on assignment so this doesn't work:
ht = <||>; b = ht; b["key"] = val; ht <||>
For this an other efficiency-related reasons I'd like to use
HashTable a lot more than I currently do.
One stumbling block is that the interface is annoying to use, to say the least.
Can we make this work a lot more like