I\'ve occasionally heard that with generics, Java didn\'t get it right. (nearest reference, here)
Pardon my inexperience, but what would have made them better?
(1) leads to some very strange behaviour. The best example I can think of is. Assume:
public class MyClass {
T getStuff() { ... }
List getOtherStuff() { ... }
}
then declare two variables:
MyClass m1 = ...
MyClass m2 = ...
Now call getOtherStuff():
List list1 = m1.getOtherStuff();
List list2 = m2.getOtherStuff();
The second has its generic type argument stripped off by the compiler because it is a raw type (meaning the parameterized type isn't supplied) even though it has nothing to do with the parameterized type.
I'll also mention my favourite declaration from the JDK:
public class Enum>
Apart from wildcarding (which is a mixed bag) I just think the .Net generics are better.