Notes from a design meeting [Kit George]

All, we're going to start publishing topics from our design meeting notes. Feel free to send general feedback on the item,or to me directly (kitg@microsoft.com).

Here's a kick off on Collections:

TrimToSize on collections. The basic issue here was whether always trimming on collections was the best thing to do. Right now, if you call TrimToSize, and your Count was 99,999, and your Capacity was 100,000, the TrimToSize is probably the wrong thing to do. This discussion was around whether we should change the existing TrimToSize (which will always Trim completely).

- Don’t change existing, shipped APIs. The break is just too risky

- Have no TrimToSize on new collections. It confuses which API should be used, and if people really want it, its easier to add later, than obsolete

- have a ‘TrimExcess’ in new collections (or some equivalent name) that has ‘only trim in these situations’ characteristics

- Make it clear to customers that they should not rely on the specific nature of the current trim mechanism. Meaning, people expect that if TrimExcess trims only if the count is > 10% smaller than the Capacity now, we may change that in the future.

- if customers indicate they need TrimToSize for specific scenarios, we will explore adding it back in