Reading the SSCLI Comments

time to read 2 min | 261 words

I'm browsing through the Shared Source CLI at the moment, for no good reasons...

I found the following comment in the System.String implementation...

**Action: Many years ago, VB didn't have the concept of a byte array, so enterprising
**        users created one by allocating a BSTR with an odd length and using it to
**        store bytes.  A generation later, we're still stuck supporting this behavior.

Good to show a sense of humer in the code, I always says.

Did you know that the CLR has a week reference hashtable? (Marked internal, of course, so you will not be able to use that ("Why, you horrible little man, why would you want to use a weak hashtable? Infidel")

You just love Clipboard Inheritance, don't you?

The generic Dictionary was copied from Hashtable's source - any bug
fixes here probably need to be made to the generic Dictionary as well.

(To be fair, I can't think of another way to do it)

I like this quote too:

(Knuth's Art of Computer Programming, Vol. 3, p. 528-9)