Safe instantiation in Generic Java
2005; Elsevier BV; Volume: 59; Issue: 1-2 Linguagem: Inglês
10.1016/j.scico.2005.07.003
ISSN1872-7964
AutoresEric E. Allen, Robert Cartwright,
Tópico(s)Software Testing and Debugging Techniques
ResumoThis 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 insidious bugs with no clearly defined point of blame.
Referência(s)