On 8/31/2010 1:15 PM, Russel Winder wrote:
I guess the questions are not so much can you survive with type erasure
on the JVM but are:
1. Did the CLR gain by supporting run time type parameters for generics?
They gained 2 disparate collections libraries for starters. Given the
plethora of Java libraries using collections, splitting the Java
universe that using old collections and that using new collections seems
like a much bigger issue than doing this to the younger, smaller .Net
library space.
2. Why were the annotations people allowed to amend the JVM when the
generics people were not?
Annotations didn't break anything. The straightforward reification
approach used by .Net of 2 having different, non-interoperable versions
of APIs would have split the Java technology space -- a "break" in my
book at least. A reification approach that would allow seamless
interoperation between old and new libraries (i.e. with 1 collection
library where any collection can be passed to both old and new
libraries) but provide runtime knowledge of generic type parameters is a
much taller order -- and it's easy to see how this was beyond the scope
of Java 5. Anyone who comes up with such an approach could ostensibly
still add it to Java N, though.
--
Jess Holle
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.