Sunday, October 10, 2004

Templates vs. Generics

Bruce Eckel (via Lambda):

A number of readers have pointed out that they would benefit from seeing an example of what I’ve been trying to say about the limitations that erasure has imposed on Java Generics in relation to other parameterized type systems, especially the most widely-known and used system: C++ templates. In this article I shall show a sequence of examples that demonstrate the issues, as well as a technique to compensate for the lack of latent typing in Java Generics.

Comments RSS · Twitter

Leave a Comment