ACM Home Page
Please provide us with feedback. Feedback
Making the future safe for the past: adding genericity to the Java programming language
Full text PdfPdf (1.91 MB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
Vancouver, British Columbia, Canada
Pages: 183 - 200  
Year of Publication: 1998
ISBN:1-58113-005-8
Also published in ...
Authors
Gilad Bracha  Sun Microsystems
Martin Odersky  University of South Australia
David Stoutamire  Sun Microsystems
Philip Wadler  Bell Labs, Lucent Technologies
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 76,   Citation Count: 118
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/286936.286957
What is a DOI?

ABSTRACT

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.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
AFM97
Ole Agesen, Stephen Freund, and John C. Mitchell. Adding parameterized types to Java. Conference on Object.Oriented Programming, Systems, Languages and Applications, pages 215-230, 1997.
AW93
BG93
 
BOW98
CCHOM89
CS98
EST95
 
GHJV94
 
GR83
 
GJ98a
Martin Odersky. The GJ compiler. Available from WWW.Cis. u nisa.ed u .au/" pizza/gj wwwipd.ira.uka.de/'pizza/gj www. math .I uc.ed u / pizza/gj www.cs.bell-labs.com/"wadler/pizza/l~
 
GJ98b
Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. G J: the Java programming language with type parameters. Mamlscript, 1998. Available at the GJ web site.
 
GJ98c
Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. GJ Specification. Manuscript, 1998. Available at the GJ web site.
 
GLS96
 
LY96
 
Mil78
Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978.
MBL97
 
OR98
Martin Odersky and Enno Runne. Measuring the cost of parameterized types in java. Research Report CIS-98-004, Advanced Computing Research Centre, University of South Australia, January 1998.
OW97
PT98
 
RS97
 
Tho97
Kresten Krab Thorup. Genericity in Java with virtual types. European Conference on Object-Oriented Programming, pages 444-471, LNCS 1241, Springer- Verlag, 1997.
 
Tor98
Mads Togersen. Virtual types are statically safe. 5th Workshop on Foundations of Object-Oriented Languages, January 1998.
 
TT98
Kresten Krab Thorup and Mads Togersen. Structural virtual types. Informal session on types for Java, 5th Workshop on Foundations of Object.Oriented Languages, January 1998.
 
Wri95

CITED BY  118

Collaborative Colleagues:
Gilad Bracha: colleagues
Martin Odersky: colleagues
David Stoutamire: colleagues
Philip Wadler: colleagues