Search Results

Search found 2 results on 1 pages for 'user63904'.

Page 1/1 | 1 

  • How can Java be improved so that it no longer needs to perform type erasure? [closed]

    - by user63904
    The official Java tutorial on generics explains type erasure and why it was added to the compiler: When a generic type is instantiated, the compiler translates those types by a technique called type erasure — a process where the compiler removes all information related to type parameters and type arguments within a class or method. Type erasure enables Java applications that use generics to maintain binary compatibility with Java libraries and applications that were created before generics. This most likely was a pragmatic approach, or perhaps the least painful one. However, now that generics is widely supported across the industry, what can be done in order for us to not need type erasure? Is it feasible with out needing to break backwards compatibility, or if it is feasible, is it practical? Has the last the last statement in the quote above become self referential? That is: "type erasure enables Java applications that use generics to maintain binary compatibility with Java libraries and applications that were created with Java versions that perform type erasure."

    Read the article

  • Will there ever be a version of Java which does not perform Type Erasure

    - by user63904
    Type erasure enables Java applications that use generics to maintain binary compatibility with Java libraries and applications that were created before generics Generics were introduced in Java 1.5, so presumably the statement "applications that were created before generics" is referring to Java 1.4? Given that Java 1.4 entered its End Of Life around 2006 and was officially End Of Life'd around 2008. Why is type erasure still being performed in Java 7, etc... Has the statement now become self referential i.e. Type erasure enables Java applications that use generics to maintain binary compatibility with Java libraries and applications that were created with Java versions that perform Type Erasure. Meaning therefore that there will never be a version of Java that doesn't perform Type Erasure.

    Read the article

1