Safe instantiation in generic Java

  • Authors:
  • Eric E. Allen;Robert Cartwright

  • Affiliations:
  • Sun Microsystems, Inc.;Rice University

  • Venue:
  • Proceedings of the 3rd international symposium on Principles and practice of programming in Java
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents the "Safe-Instantiation Principle," a new design principle for evaluating extensions of Java with support for generic types. We discuss the GJ and NextGen formulations of Generic Java and the implications of safe instantiation on both approaches. We then consider the implications of safe-instantiation for the addition of mixins to Java via generic types. Finally, we defend the formulation of mixins as hygienic program constructs, arguing that a hygienic formulation is the only way to maintain safe instantiation and type soundness in Java with mixins, and to prevent the introduction of insidious bugs with no clearly defined point of blame.