Safe instantiation in generic Java

  • Authors:
  • Eric E. Allen;Robert Cartwright

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

  • Venue:
  • Science of Computer Programming - Special issue: Principles and practices of programming in Java (PPPJ 2004)
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper introduces the "Safe Instantiation Principle", a new design criterion for evaluating extensions of Java that support generic types. The paper initially focuses on the GJ and NextGen formulations of Generic Java and the implications of safe instantiation for both approaches. Then it applies the safe instantiation principle to the problem of adding mixins to Java as generic types. Finally, it shows that the hygienic formulation of mixins is the only way to maintain safe instantiation and type soundness in Java with mixins and to prevent the introduction of inidious bugs with no clearly defined point of blame.