ACM SIGPLAN Notices · 1998 · 42 citations · 10 references
ComputingComputer ScienceCompilersProgramming LanguagesSoftware EngineeringGeneric ProgrammingObject-oriented ProgrammingSoftware ConstructionSoftware DesignType CheckingType SystemsAbstract TypesGeneric TypesRuntime Type SystemsType ConstructorsType ConversionType ParameterizationType SafetyType-level Programming
We present GJ, a design that extends the Java programming language with generic types and methods. These are both explained and implemented by translation into the unextended language. The translation closely mimics the way generics are emulated by programmers: it erases all type parameters, maps type variables to their bounds, and inserts casts where needed. Some subtleties of the translation are caused by the handling of overriding.GJ increases expressiveness and safety: code utilizing generic libraries is no longer buried under a plethora of casts, and the corresponding casts inserted by the translation are guaranteed to not fail.GJ is designed to be fully backwards compatible with the current Java language, which simplifies the transition from non-generic to generic programming. In particular, one can retrofit existing library classes with generic interfaces without changing their code.An implementation of GJ has been written in GJ, and is freely available on the web.
10
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Martin Odersky, Philip Wadler · 1997 · 419 citations · Full text
F-bounded polymorphism for object-oriented programming
Peter S. Canning, William R. Cook, Walter L. Hill et al. · 1989 · 330 citations
Type inclusion constraints and type inference
Alex Aiken, Edward L. Wimmers · 1993 · 260 citations
Joseph A. Bank, Andrew C. Myers, Barbara Liskov · 1997 · 251 citations