

State of the Specialization: Generics over primitives in Java and JVM - udalov
http://cr.openjdk.java.net/~briangoetz/valhalla/specialization.html

======
paol
Interesting. This just reinforces my opinion that they made a terrible
decision with the original implementation of generics in Java. Basically they
set themselves the constraint that generics would have to be implemented
without touching the JVM, in the name of a completely unnecessary form of
forward compatibility (basically you can compile generics-using code in Java
1.5 and run it on a 1.4 JVM).

The only upside was that the existing collection classes could be "upgraded"
to generics, rather than having to create a new set of collections classes.
When faced with the same decision, C# went ahead and did just that - eliciting
complaints from exactly no-one - and in return gained powerful and robust
support for generics at the VM level. Contrast that with the contortions being
proposed in the article just to try to extend Java generics to fundamental
types.

