Wintellect  

July 2004 - Posts

Based on various feedback, I updated some parts of OrderedDictionary: 1. The View nested class, returned by Range, RangeTo, RangeFrom, and Reversed, now implements IDictionary and IDictionary<KeyType,ValueType>. You can add and delete entries through Read More...
I've posted a copy of the source license here . I didn't have anything to do with this, and I'm not a lawyer, so I probably won't be able to to answer much in the way of questions. But if you have feedback, I can pass it on to the folks responsible and Read More...
I firmly believe that using good names is very important in API design. Several people have comments on my proposed name of OrderedDictionary for the comparison-based dictionary that uses a balanced binary tree as its implementation. These people feel Read More...
Today, as we got into the car and drove off, my 3 year old son uttered those four magical words that every parent longs to hear: “ I want Eric Clapton ” Read More...
It seems slightly unfortunate that System.Collections.BitArray doesn't implement IList<bool>. I supposed the use cases don't overlap that much, but bool[] does implement IList<bool>, so shouldn't BitArray do so as well? Read More...
I've been writing XML comments for all my code. I now want to compile these into nice documentation. I've used NDoc before to do this, and really like it, but as far as I can tell it does not support generics yet (and in fact barfs if it sees them). Any Read More...
Should it be allowed to add a key-value to a dictionary with a “null” key? It seems like it could be useful; after all, null is a valid value of reference types and so should be storable into a dictionary. I began implementing OrderedDictionary Read More...
The “AddOrUpdate” and “FindOrAdd” methods both return a bool that indicates which operation ended up being beformed (Add vs Update, Find vs. Add). That leaves the question, which should be true and which should be false? How will Read More...
Here's my initial thinking on the design of OrderedDictionary. As mentioned earlier, OrderedDictionary maintains a dictionary of key-value pairs, sorted by the key value. It is implemented internally as a balanced binary tree, and adding, removing, and Read More...
NCollection is a project that is similar in intent to Power Collections. So far they seems to have a white paper up with some design ideas. Unclear if they are using generics or not. Looks interface-centric so far, which I've already given my two cents Read More...
Brad asks me to comment on the issue of naming of generic type parameters . Certainly the longer names seem preferable when the type is being used or viewed in the class browser. Currently, I'm using ElementType, KeyType, and ValueType as my generic type Read More...
An email correspondent writes: I was wondering to what degree Power Collections is going to be alternate implementations of existing BCL concepts, or if you're going to implement new interfaces or refactor existing ones. For example, Set, Bag, and OrderedCollection Read More...
So what collections should we be putting into Power Collections? Looking at the feedback on Brad's original blog post, and by looking at other collections libraries in other languages, there are some obvious holes in System.Collections.Generics that should Read More...
Another interface in Beta 1 that I have some questions about is IComparer<T>. In Beta 1, this interface looks like: interface IComparer<T> { int GetHashCode(T t); bool Equals(T t1, T t2); int Compare(T t1, T t2); } The problem with this interface Read More...
There are three basic ways to provide feedback on Power Collections. 1. Comment on web log postings here. This is probably the easiest and most direct way, and will most closely link your feedback to what you are commenting on. 2. Make a posting on the Read More...
I just installed the new Beta 1 of C# Express and .NET Framework 2.0. (Generally, the IDE looks pretty awesome!) I've been spending some time looking over the new generic collections and interfaces in Beta 1, and comparing them to the non-generic versions, Read More...