|
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
|
Gilad Bracha , David Griswold, Strongtalk: typechecking Smalltalk in a production environment, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.215-230, September 26-October 01, 1993, Washington, D.C., United States
|
| |
BOW98
|
|
 |
CCHOM89
|
Peter Canning , William Cook , Walter Hill , Walter Olthoff , John C. Mitchell, F-bounded polymorphism for object-oriented programming, Proceedings of the fourth international conference on Functional programming languages and computer architecture, p.273-280, September 11-13, 1989, Imperial College, London, United Kingdom
[doi> 10.1145/99370.99392]
|
 |
CS98
|
Robert Cartwright , Guy L. Steele, Jr., Compatible genericity with run-time types for the Java programming language, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.201-215, October 18-22, 1998, Vancouver, British Columbia, Canada
|
 |
EST95
|
Jonathan Eifrig , Scott Smith , Valery Trifonov, Sound polymorphic type inference for objects, Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, p.169-184, October 15-19, 1995, Austin, Texas, United States
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Laurent Bernardin , Bruce Char , Erich Kaltofen, Symbolic computation in Java: an appraisement, Proceedings of the 1999 international symposium on Symbolic and algebraic computation, p.237-244, July 28-31, 1999, Vancouver, British Columbia, Canada
|
|
|
Eric Wohlstadter , Stoney Jackson , Premkumar Devanbu, Generating wrappers for command line programs: the Cal-Aggie Wrap-O-Matic project, Proceedings of the 23rd International Conference on Software Engineering, p.243-252, May 12-19, 2001, Toronto, Ontario, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mads Torgersen , Christian Plesner Hansen , Erik Ernst , Peter von der Ahé , Gilad Bracha , Neal Gafter, Adding wildcards to the Java programming language, Proceedings of the 2004 ACM symposium on Applied computing, March 14-17, 2004, Nicosia, Cyprus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Alex Potanin , James Noble , Robert Biddle, Generic ownership: practical ownership control in programming languages, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DeLesley Hutchins, The power of symmetry: unifying inheritance and generative programming, Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 26-30, 2003, Anaheim, CA, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
D. Ancona , C. Anderson , F. Damiani , S. Drossopoulou , P. Giannini , E. Zucca, A provenly correct translation of Fickle into Java, ACM Transactions on Programming Languages and Systems (TOPLAS), v.29 n.2, p.13-es, April 2007
|
|
|
Paul Hudak , John Hughes , Simon Peyton Jones , Philip Wadler, A history of Haskell: being lazy with class, Proceedings of the third ACM SIGPLAN conference on History of programming languages, p.12-1-12-55, June 09-10, 2007, San Diego, California
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Yoav Zibin , Alex Potanin , Mahmood Ali , Shay Artzi , Adam Kie|un , Michael D. Ernst, Object and reference immutability using Java generics, Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, September 03-07, 2007, Dubrovnik, Croatia
|
|
|
|
|
|
|
|
|
Davide Ancona , Massimo Ancona , Antonio Cuni , Nicholas D. Matsakis, RPython: a step towards reconciling dynamically and statically typed OO languages, Proceedings of the 2007 symposium on Dynamic languages, October 22-22, 2007, Montreal, Quebec, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sara Capecchi , Mario Coppo , Mariangiola Dezani-Ciancaglini , Sophia Drossopoulou , Elena Giachino, Amalgamating sessions and methods in object-oriented languages with generics, Theoretical Computer Science, v.410 n.2-3, p.142-167, February, 2009
|
|
|
Iulian Dragos , Martin Odersky, Compiling generics through user-directed type specialization, Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, p.42-47, July 06-06, 2009, Genova, Italy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|