Results 1 to 2 of 2
  1. #1
    sardare is offline Member
    Join Date
    Jun 2008
    Posts
    17
    Rep Power
    0

    Default 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

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. Generics in java
    By ajeeb in forum Advanced Java
    Replies: 5
    Last Post: 01-23-2009, 04:56 PM
  2. Question about java generics
    By Arrowx7 in forum New To Java
    Replies: 1
    Last Post: 08-14-2008, 02:37 AM
  3. Java confused over Generics?
    By Bibendum in forum New To Java
    Replies: 3
    Last Post: 12-26-2007, 06:23 AM
  4. Java Generics (an introduction)
    By Java Tutorial in forum Java Tutorial
    Replies: 0
    Last Post: 11-27-2007, 06:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •