Questions about collection support in the BCL [Kit George]

The following question was raised by Ilya Ryzhenkov, via the BCL web page: "[I] just found myself in [the] situation when I need ICollection with Add, Remove, Contains but no indexed access like insert, this[], and IndexOf. Actually, this what probably best suites to name "List". So, are you going to add more collection kinds or not?"

Ilya, we're very focussed on Generic collections right now. With the introduction of generics, we want to make sure we're providing generic solutions which meet the needs of collection consumers, and provide at least an as good, and generally better story than the existing base collections. We will continue to explore the potential for additional collections, but the next release will be primarily focused on generic collections.

Comments (3)

  1. Anonymous says:

    Understood. But anyway users will develop generic collections for their specific cases and those collections will implement generic interfaces. To adopt to generics, let me rephrase the question: "Is there any chance we will have more collection interfaces besides ICollection<T>, IList<T> and IDictionary<T>?" To me, indexed access methods in IList<T> seems like misnamed interface. I understand that it might be a breaking change to remove indexed access from IList and invent something like IArrayList, but since generic interfaces are not yet used, it may be good idea to fix the naming problem.

  2. Anonymous says:

    I have had the same problem, Ilya. Sounds like you want a logical organization a la STL. A good idea.

  3. Anonymous says:

    In answer to your second question Ilya, It’s not likely in the near future. We will ALWAYS consider additional interfaces and designs, and in fact, we’re actively exploring the most reasonable collections and ideas all the time. But right now, parity between generics and collections is taking all our efforts, so that will remain the focus.

Skip to main content