4 ms·
I think generics in Java works pretty well. Should it have been there from the beginning. Yes, but it would have delayed the release of JDK 1.0. People often
by haglin 8y ago
I think generics in Java works pretty well.
Should it have been there from the beginning. Yes, but it would have delayed the release of JDK 1.0.
People often complain about type erasure, but I have seen very few examples of everyday programming where it would have helped. I think type erasure was a reasonable compromise.
The only real use case I can see is value types.
You want List<int> to be backed by array of ints, not Integer objects. But there are already plans to add this to JVM, once value types are added.