Results 1 to 2 of 2
Thread: java generics implementation
- 01-14-2010, 01:43 AM #1Member
- Join Date
- Jun 2008
- Rep Power
java generics implementation
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?
As I understand it, they created generics the way they are precisely for backwards compatibility.
- By ajeeb in forum Advanced JavaReplies: 5Last Post: 01-23-2009, 04:56 PM
- By Arrowx7 in forum New To JavaReplies: 1Last Post: 08-14-2008, 02:37 AM
- By Bibendum in forum New To JavaReplies: 3Last Post: 12-26-2007, 06:23 AM
- By Java Tutorial in forum Java TutorialReplies: 0Last Post: 11-27-2007, 06:50 PM