java generics implementation
Hi,
There are a number of drawbacks of Java Generics that can lead to many problems. Most of these are related to the fact that the run time type information is not available for the actual type of the object and the class definition is shared across all parametrizations. These problems do not occur in C++ as each type of parameter gets its own function/class definition. I was wondering why are Generics not implemented in the same way as C++. THis would help solve a lot of problems with Generics and provide much stronger type safety and backward compatibilty. Yes it does increase code size but is taht the only reason?
thanks!
Sam