Generics in C#, Java
843793Jan 26 2004 — edited Jan 27 2004I know this has been discussed over and over again.. but I'm still hoping that the implementation of Java generics will include primitive optimizations.
Part of conversation between Bruce Eckel and Anders Hejlsberg
original http://www.artima.com/intv/generics2.html
>
Anders Hejlsberg: It's instantiating at runtime, exactly. It's producing native code specifically for that type at the point it is needed. And literally when you say List<int>, you will get a List of int. If the code in the generic type uses an array of T, that becomes an array of int.
if C# generics use native types and Java's use wrapper objects you all know how that's going to look in millions of benchmarks that are going to be published as soon as the tiger is out... Containers are one of the key objects and almost every program needs them. Please consider including containers for primitive types in the final tiger release.