jrtom: (Default)
2007-08-13 03:01 pm
Entry tags:

Dear C# Architects

If I want to know if a given key is in a Dictionary, I'll do a Contains check myself.

In particular, I do not want you to throw an exception if I either

(a) attempt to retrieve a value for a key not in the dictionary, or
(b) attempt to set a value for a key in the dictionary.

Seriously. Not everything that might possibly be an error needs to result in throwing an exception (and had it occurred to you that I might want to _replace_ a value in the dictionary without the extra overhead of a call to Remove()?). Sheesh.

Your Somewhat Reluctant Disciple,

[livejournal.com profile] jrtom

PS: And get a decent collections API already, for [INSERT DEITY HERE]'s sake. Power Collections is a place to start, but by no means a place to finish...and it does not make up for many existing inadequacies.