[quote]Right, thought I might have misunderstood the spec 
Kev
[/quote]
c.f. :
Hm, according to the guy that designed .net, the way that Java is doing generics is just like what I thought it was doing after all
(That is, using only one class implementation that works with Objects and then inserting casts behind-the-scenes for you all over the place). Damn.
Cas 
Iām likin 1.5, but is there a reasonable estimate on when a final release will be available (based on past releases or pure speculation or possibly astrological signsā¦)?
[quote](That is, using only one class implementation that works with Objects and then inserting casts behind-the-scenes for you all over the place)
[/quote]
The C# architect may be right that this is bad for reflection purposes, but I really think the performance of casts is a non-issue.
My experience from optimizing code is that object-type casts done using the 1.4+ JVMs donāt affect the performance at all. Now, the auto-boxing on the other handā¦
I had a think about autoboxing and where itās being used. It certainly wonāt make anything slower than it already is. But I did wonder exactly how a generic HashMap (for example) would manage to call hashCode() on float. I suppose thereās some hackery going on behind the scenes.
Cas 
[quote]I had a think about autoboxing and where itās being used. It certainly wonāt make anything slower than it already is. But I did wonder exactly how a generic HashMap (for example) would manage to call hashCode() on float. I suppose thereās some hackery going on behind the scenes.
[/quote]
A List isnāt a valid type in Java. You canāt use primitive data types as arguments for generic type expressions. The valid variant is List. This stores ordinary Float objects and Float#hashCode is a well known method. No magic involved 
(BTW, HashMap is of course illegal, the generic type HashMap<K,V> requires two arguments)
Yeah, sorry, slightly duff example. But in C# you can have a HashMap<float,float> - thatās what Iām getting at. They actually generate their bytecodes on the fly and instantiate a brand new class, and allow primitive types as generic parameters.
Cas 