why Java doesn't support reification generic as C#
843793Nov 4 2008 — edited Nov 5 2008Hi all,
Sorry. I know this issue had been discuss over and over again. However, it seems that there are no concrete conclusion out of the discussion.
I read Bruce Eckel's article
http://mindview.net/WebLog/PuzzlingThroughErasureII
http://mindview.net/WebLog/log-0058
coupled with Neal Gafter's article. http://gafter.blogspot.com/2004/09/puzzling-through-erasure-answer.html
I get confusing :(
Here is the conclusion I made, after studying Bruce Eckel's web site.
(1) c# suppport reification generic
(2) 1.0 c# binary can be executed in 2.0 .NET environment, without recompiled the source code
(3) java support erasure generic
(4) the reason java doesn't want to support reification generic, is because once java introduces reification generic, java <5.0 binary, cannot be executed in java 5.0 environment
See. There is a conflict among point (2) and point (4). Hence, I am totally not convience on the point why the Java designer doesn't use reification generic in their design.
Do you have a good explanation on why Java doesn't support reification generic?
The argument by Neal's
Microsoft is essentially deprecating the old collections classes by introducing a new, preferred set of generic collections classes. They are creating the kinds of problems described in the Company A-B-C scenario, only it might just be less of a problem for them because they control so much more of the software stack. I do not claim that they break backward compatibility.
Sadly, I cannot see any backward compatibility problem as mentioned by Neal. I just know that, "1.0 c# binary can be executed in 2.0 .NET environment" as pointed by Bruce Eckel's web site
I checked this out with Anders Hejlsberg (the lead designer of C#) and he said:
+.NET is backwards compatible in the sense that older .NET applications and libraries continue to function on newer releases of the .NET Framework. To me, this is the essential meaning of backwards compatible.+
+[Later] ... there is no need to recompile .NET 1.0 (or 1.1) libraries in order to run them on .NET 2.0. The old binaries continue to work.+
So, what is the "true" reason, that Java doesn't support reification generic as C#?
Thank you very much!
Cheok