T
Tim Tyler
A while ago, Dale King asked why we have type erasure.
Erasure would make sense if Java 1.5 code had to run of earlier JVMs,
but - as has been noted - code compiled for Java 1.5 rarely works
at all on earlier JVMs - and can't be easily targetted at them.
The "Java Theory and Practice: Generics Gotchas" page suggests a reason:
``Extending the virtual machine instruction set to support generics was
deemed unacceptable, because that might make it prohibitively difficult
for JVM vendors to update their JVM.''
- http://www.developertutorials.com/print/125.html
Erasure would make sense if Java 1.5 code had to run of earlier JVMs,
but - as has been noted - code compiled for Java 1.5 rarely works
at all on earlier JVMs - and can't be easily targetted at them.
The "Java Theory and Practice: Generics Gotchas" page suggests a reason:
``Extending the virtual machine instruction set to support generics was
deemed unacceptable, because that might make it prohibitively difficult
for JVM vendors to update their JVM.''
- http://www.developertutorials.com/print/125.html