Making the future safe for the past: Adding Genericity to ... - CiteSeerX
Recommend Documents
an existing language is almost routine. We proposed adding generics to the Java
programming language in. Pizza [OW97], and we know of four other proposals.
Aug 8, 2011 - Project Management Journal, 39 (3), 86â. 96. Chapman, J.C., 1998. Collapse of the Ramsgate walkway. The Structural Engineer, 76 (1), 1â10.
Jul 28, 2011 - THE AUTOMATION OF THE 'MAKING SAFE' PROCESS IN SOUTH .... Causes of seismic events that lead to fall of ground may include the shift ...
A detailed scenario developed by the MIT Study Group on the Future of Nuclear Power shows, however, that the share of nuclear power in these same countries.
May 7, 2005 - Safe blood transfusion law. 2002 has been ... Official Gazette notification of the law has been published for ... educate our society. Thus we can ...
Bridging the Past, Present and Future: .... Our approach differs from all of the above methods fun- ... Graphical Model â green: links to generate all activities,.
turning Kiruna, once a core area for Saami reindeer herding ... 56 Daniel Svensson, Making Place for the Future ...... Ingegärd and Lena stress the kind of expe-.
Christian Azar, John Holmberg*, Sten Karlsson with contributions from Tobias Persson, ...... (McSweeney & Hirosaka 1991). This would suggest an N-shaped.
Jul 16, 2008 - University, Port Elizabeth 6031, Eastern Cape, South Africa ..... tion has probably occurred on elephants for as long as our species have co-existed. ..... Hayward MW, Adendorff J, O'Brien J et al (2007) The reintroduction of ...
Decoupling - past trends and prospects for the future. Christian Azar, John Holmberg*, Sten Karlsson with contributions from Tobias Persson, Robert Ayres, ...
Jul 16, 2008 - In: Hayward MW, Somers MJ (eds) The reintroduction of top-order predators. ... In: Brett M (ed) Madikwe Game Reserve: a decade of progress.
Department of Computer Science, University of Aarhus. Ny Munkegade ... Generic types in programming languages are most often sup- ported with ... virtual types as well as the function-like nature of parameterized classes. 1 Introduction.
some of the problems of object-oriented development technologies. ... provide a well-suited tool-box for component-based application development, but practice ...
Digital technologies have the potential to enable history teachers to engage .... historical perspectives, and understand the ethical dimensions of history (Centre for the Study of ...... What_is_new_about_new_literacies_of_online_reading.pdf.
Jun 19, 2014 - Helen Flynn: Liberal Democrat Councillor for Harrogate and Liberal Democrat. Parliamentary Spokesperson f
Sep 15, 2007 - Indeed, brain regions that have traditionally been associated with memory appear to be similarly engaged when people imagine future ...
Sep 18, 2007 - The 7th International Digital Arts and Cultures Conference. The Future of .... software are bought and sold at Internet auction sites. Various.
1982; Norton et al., 1987; Whiten et al., 1991; Byrne et al., 1993; .... If baboons represent a model for understanding the behavioral flexibility ...... 57:490â501.
Address: Department of Chemistry & Bio- chemistry ... proposals for new layouts of the elements that look nothing like a two-dimensional chart. the elements ...
the Future: Rebuilding California's Infrastructure, the authors examine, ..... 99. Linking Capital Budgeting and Strategic Planning ........ 102. U.S. Bureau of Reclamation: A Best-Practice Model ..... capacity following the passage of Proposition 13
Making Career Development a Priority. Kenneth R Hughey. Judith K. Hughey. Kansas State University. Introduction. Preparing students for their future roles in ...
in the JavaTM programming language is the lack of a gener- icity mechanism for ... subtyping|on top of the existing Java Virtual Machine at the cost of a larger ...
preserved in familial, community, or national memory. There is a ... The popu- lar narrative viewed the American Indian past .... the Mississippi River, together running away from society and ... led the recently surrendered Cheyenne on the.
Making the future safe for the past: Adding Genericity to ... - CiteSeerX
age p), or else the body of class C must refer only to ..... Thanks to Enno Runne and Matthias Zenger, for their ... Walter Hill, Walter Oltho , and John C. Mitchell.
Making the future safe for the past: Adding Genericity to the JavaTM Programming Language Gilad Bracha, Sun Microsystems, [email protected] Martin Odersky, University of South Australia, [email protected] David Stoutamire, Sun Microsystems, [email protected] Philip Wadler, Bell Labs, Lucent Technologies, [email protected]{labs.com
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 simpli es the transition from non-generic to generic programming. In particular, one can retro t 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.
1 Introduction Generic types are so important that even a language that lacks them may be designed to simulate them. Some object-oriented languages are designed to support subtypes directly, and to support generics by the idiom of replacing variable types by the top of the type hierarchy. For instance, a collection with elements of any type is represented by a collection with elements of type Object. To appear in the 13th Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'98), Vancouver, BC, Canada, October, 1998.
This approach is exempli ed by the Java programming language[GLS96]. Generics are represented by this idiom throughout the standard Java libraries, including vectors, hash tables, and enumerations. As the Java Development Kit (JDK) has evolved, generics have played an increasing role. JDK 1.1 introduced an observer pattern that depends on generics, as do the collection classes introduced in JDK 1.2. Oberon also relies on the generic idiom, and dynamically typed languages such as Smalltalk [GR83] use this idiom implicitly. Nonetheless, generics may merit direct support. Designing a language with direct support for subtyping and generics is straightforward. Examples include Modula 3, Ada 95, Eiel, and Sather. Adding generics to an existing language is almost routine. We proposed adding generics to the Java programming language in Pizza [OW97], and we know of four other proposals [AFM97, MBL97, TT98, CS98]. Clemens Szyperski proposed adding generics to Oberon [RS97]. Strongtalk [BG93] layers a type system with generic types on top of Smalltalk.
The generic legacy problem However, few proposals tackle the generic legacy problem: when direct support for generics is added to a language that supports them via the generic idiom, what happens to legacy code that exploits this idiom? Pizza is backward compatible with the Java programming language, in that every legal program of the latter is also legal in the former. However, this compatibility is of little help when it comes to generics. For example, JDK 1.2 contains an extensive library of collection classes based on the generic idiom. It is straightforward to rewrite this library to use generics directly, replacing the legacy type Collection by the parametric type Collection. However, in Pizza these two types are incompatible, so one must rewrite all legacy code, or write adaptor code to convert between legacy and parametric types. Code bloat may result from refer-