Suggestions for Java Generics Semantics in Java Version 7.0 _ Found The Solutions In A Blog

Jaisimha Narahari jcnarahari at yahoo.com
Fri Jun 12 05:26:04 PDT 2009


Hi Maurizio,

Thanks for those comments in my post.

However, I Found The Descriptions of the Technical Solutions for both of my suggestions in the following blog which might also interest you:
 
http://gafter.blogspot.com/2006/11/reified-generics-for-java.html

Just for the record , actually, if you LOOK ONLY AT THE TWO SUGGESTIONS that I have made in the earlier posts, reproduced here:



From Java Version 7.0, going forward:


                  (1) "Deprecate" Raw Types
 

                  (2) Remove Backward
Compatibility provision and therefore convert "Erasure"

                       to
"Reification" for Generic Types, the
consequence of which will render the

                       above two rules for the usage of Generic Types unnecessary,
making all                       types provided by the language behave uniformly, most especially 

                       without violating OOP
principles in what is essentially an OOP Language.

 

what I meant is that if these two changes can be made to Java 7, which implies also Runtime support from the JVM, in addition to changes in javac, then Java would be robust, without requiring special treatment of Generic Types.

By suggestion (2) above, Reification of Generic Types implies carrying
over the Type info of Type Parameters to the Runtime - possible only
with support both from the JVM and javac.



Thanks again for your comments, but the blog at the above given URL summed up the answer for me.

It would be very worthwhile for Sun to try and implement one of the Two Solutions given in the blog at the above URL. 





      


More information about the jdk7-dev mailing list