Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generics in C#, Java

843793Jan 26 2004 — edited Jan 27 2004
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2004
Added on Jan 26 2004
4 comments
176 views