Lambda the Ultimate points to an interesting commentary on generics (as done in Java, but I think the C# implementation qualifies as well) - Generics Considered Harmful:
Any feature added to any system has to pass a basic test: If it adds complexity, is the benefit worth the cost? The more obscure or minor the benefit, the less complexity its worth. Sometimes this is referred to with the name “complexity budget”. A design should have a complexity budget to keep its overall complexity under control.
Humans can't track this stuff. They are always losing which exception to what other exception applies (or doesn't) in any given case.
I've brought this up before. In languages like Smalltalk, we simply don't have this problem -we have unlimited polymorphism, which allows us to make partial or full interfaces without having to follow a baroque set of rules. The Java and C# implementations force the baroque set of rules though, and end up with a cost that outweighs the benefit.
How did they end up there? Ultimately, it's because Gosling, Hejlberg, and the people working with them don't have any respect for you as a developer. The languages they designed were built to "protect" you from the power that you have in Smalltalk (and Lisp, and Scheme, etc). Instead, they decided to wrap developers in a cocoon of familiar syntax and a blizzard of keywords.
Need a feature? We can't trust developers to do that themselves - by gosh, they might blow their foot off or something! Instead, we'll limit the power (and potential productivity) for them. Go back to your school days and you'll recognize this theory of operation - it's called "punishing the class" for the sins of the few.
I actually had this conversation with Joshua Bloch last year at ot2004. After his talk, I got up and asked him about "final" - IMHO, it's simply an awful idea, because it presumes that the initial developer of an API has perfect knowledge about all the eventual uses. That's simply not the case, and I told him so. How did he answer? Well, he said that he (and the Java team at Sun) saw the community of developers as a pyramid. The Smalltalkers are up at the peak, and are smart enough to handle all the power they have. He told me (no, I didn't imply this - it was him) - that the Java community was primarily the lower two tiers (imagine 5 in this pyramid) of developers, and simply couldn't handle that kind of power - so Sun had to shield them from it.
Remember now, this is coming from the guy who was part of Sun's API team, and he was speaking to me as a member of that team. To paraphrase from a 1970's era NY Daily News headline about federal reactions to NYC deficits:
Sun to Developers: You're too stupid to deal with a powerful language
So now that theory of operation is starting to yield negative consequences. As it happens, people need things like generics (or the power to create them in an ad-hoc fashion, as we do in Smalltalk) - so Sun (and MS) have to layer that on top of a design that wasn't really meant for something like that. Keeping in mind their "protect the developer from himself" theory of operation, they came up with the barrel full of complexity that is generics in these languages.
The article in Lambda contains a few amusing examples of the problem, such as this one:
The article contains a few simple supporting examples, include the interesting definition of Java 5's Enum type as:
Enum<T extends Enum<T>>
...which "we're assured by the type theorists ... we should simply not think about too much, for which we are grateful."
One can just about picture the Great and Powerful Oz behind the curtain, pulling the levers and twisting the knobs, all the while hoping that no one stops to consider the absurdity of it all. It's all smoke and mirrors - but really complicated smoke and mirrors, designed to prevent anything useful from ever getting done.