Formalising sharing mechanisms in object-oriented paradigm - Argarañaz, Verónica (1997)
Sharing of behavior is one of the most important features in the Object-Oriented paradigm. The two classical organisations of sharing are classes and prototypes, raising two different models and two families of object oriented languages. It has been largely discussed which of these two models is the most basic, giving the essence of the Object-Oriented paradigm. We claim that sharing schemes can be constructed in a more basic model with just objects and messages. We analysed the features this model must express, specially the ability to share behavior. Abadi and Cardelli have defined a calculus of objects which represents the basic elements. They describe how to build the concepts of class based languages in their formalism. In this work we show how to express delegation between concrete objects in the calculus. The key advantage of our contribution is that by providing per object delegation we can represent every sharing scheme possible in a prototype environment, thus completing the conviction that all the usual constructs found in OO can be built using only objects and messages. We have defined sharing constructs for an object based (prototypes) high level language, and their translation into the formal calculus. This shows how constructs similar to those appearing in usual programming languages can be written in the formal calculus, and allows writing programs in the formalism without requiring understanding details about it. There are primitives to express the sharing relationship in object creation, to change that relationship and to reference the donor of an object.