K
Keith Patrick
I'm curious as to what the role of the legacy collections in .Net will be
once generics are part of the CLR. I prefer to use strongly-typed
collections everywhere (going so far as creating a whole slew of typed
collections like StringList/StringDictionary, Int32List/Int32Dictionary,
etc...Those classes are wrappers, incidentally, so I can code them now with
less elegant implementations while allowing for easy migration to the
generics versions). But I'm curious if there is a role any more for regular
System.Object collections outside scenarious where someone really would want
to store anything. For example, because all objects have .ToString(), is it
overkill to have StringList? I tend to be a purist in this sense and say
convenience of not having to write a StringList class should take a back
seat to having collections with compile-time type checking, but that's just
me.
once generics are part of the CLR. I prefer to use strongly-typed
collections everywhere (going so far as creating a whole slew of typed
collections like StringList/StringDictionary, Int32List/Int32Dictionary,
etc...Those classes are wrappers, incidentally, so I can code them now with
less elegant implementations while allowing for easy migration to the
generics versions). But I'm curious if there is a role any more for regular
System.Object collections outside scenarious where someone really would want
to store anything. For example, because all objects have .ToString(), is it
overkill to have StringList? I tend to be a purist in this sense and say
convenience of not having to write a StringList class should take a back
seat to having collections with compile-time type checking, but that's just
me.