One of the base concepts of object-oriented programming is that of "method". In languages supporting inheritance, this concept is realized by three different actions: (i) the introduction of a new method; (ii) the implementation/override of an existing method; (iii) the method call. The bindings between (ii) and (i), and between (iii) and (i) are typically based on method names, which are not guaranteed to be unique, thus such bindings might cause some ambiguities. As a result, modifications of existing code may cause errors in some other parts of the code, especially in programs written by third party developers; overall, a programmer cannot predict the moment in the execution when such ambiguities will arise. In this paper, we describe the nature of these problems and propose a general mechanism to overcome ambiguities in a safe, straightforward, and flexible way. To study the details of this mechanism, and make the reader more familiar with it, we show how to apply this mechanism to Java, and also to a mixin-oriented language called MixedJava.

Hygienic methods - Introducing HygJava

BONO, Viviana
2007-01-01

Abstract

One of the base concepts of object-oriented programming is that of "method". In languages supporting inheritance, this concept is realized by three different actions: (i) the introduction of a new method; (ii) the implementation/override of an existing method; (iii) the method call. The bindings between (ii) and (i), and between (iii) and (i) are typically based on method names, which are not guaranteed to be unique, thus such bindings might cause some ambiguities. As a result, modifications of existing code may cause errors in some other parts of the code, especially in programs written by third party developers; overall, a programmer cannot predict the moment in the execution when such ambiguities will arise. In this paper, we describe the nature of these problems and propose a general mechanism to overcome ambiguities in a safe, straightforward, and flexible way. To study the details of this mechanism, and make the reader more familiar with it, we show how to apply this mechanism to Java, and also to a mixin-oriented language called MixedJava.
2007
vol. 6, no. 9
209
229
http://www.jot.fm/issues/issue_2007_10/paper11/index.html
J. KUS'MIEREK; V. BONO
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/29039
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 3
  • ???jsp.display-item.citation.isi??? ND
social impact