Hi Garry,
I have two requests for HashSet (and, as it turns, out Dictionary).
Currently HashSet has a Clear() method, while Array(Of T) has a RemoveAll() method. While I personally prefer Clear() (shorter, and it's --koff-- clear what it means), I think that RemoveAll() is consistent and -- shall we coin a phrase? -- Objoic. I mean if the Python folks can wax eloquent about an expressing being Pythonic, why can't we do the equivalent?
The other request is the option for a HashSet(Of String) to be case-sensitive. There are times when case differences matter. Probably not often, but if I'm using a HashSet(Of String) to, e.g., enforce uniqueness on some more complex collection, it isn't for me to decide how the client must define "unique" for a string key, I have to offer them the choice. It is fine, and probably best, for this to be determined by the constructor by adding an optional Boolean argument, so new HashSet(Of String)(True) or new HashSet(Of String)(1000,True) to specify case sensitivity.
Now that I think to look it up, the docs for Dictionary(Of String, whatever) doesn't document case sensitivity but I would guess it's case-insensitive; I think the same argument applies there. Case-sensitive string keys should be an option. And Dictionary also uses Clear(). We should standardize one way or the other.
And now the obligatory aside: I tried to click on the edit button next to the heading for this post to make it about HashSets and Dictionaries, but it wasn't "hot" so didn't do anything.