I've read Neal Gafter's blog on the subject and am still unclear on a number of points.
Why is it not possible to create a implementations of the collections api that preserve type information given the current state of Java, the JVM and existing collections API? Couldn't these be them replace the existing implementations in a future version of java in a way where backwards compatibility is preserved?
As an example:
List<T> list = REIList<T>(T.Class);
Where REIList is something like this:
public REIList<T>() implements List {
private Object o;
private Class klass;
public REIList(Object o) {
this.o = o;
klass = o.getClass();
}
... the rest of the list implementation ...
And the methods use Object o and Class klass to get the type information.
Why would preserving generic class information require language changes rather than just a JVM implementation change?
What am I not understanding?