Sciweavers

FCT
2007
Springer

FJMIP: A Calculus for a Modular Object Initialization

13 years 10 months ago
FJMIP: A Calculus for a Modular Object Initialization
In most mainstream object-oriented languages, the object initialization protocol is based on constructors, where different constructors of the same class are, in fact, overloaded variants of the same method. This approach has some disadvantages: it forces an exponential growth of the code with respect to the number of properties, it may cause duplication of code, and it may create unnecessary code dependencies. To the best of our knowledge, the literature lacks formal proposals that model non-trivial object initialization protocols. In this paper we present a calculus (called FJMIP), which is an extension of the Igarashi-Pierce-Wadler Featherweight Java and models a novel object initialization protocol. Our calculus is reasonably simple, but it offers two benefits: (i) it formalizes a modular way of initializing objects that does not suffer from the previous mentioned flaws, while still being an expressive object initialization protocol; (ii) as a by-product, it allowed us to intr...
Viviana Bono, Jaroslaw D. M. Kusmierek
Added 07 Jun 2010
Updated 07 Jun 2010
Type Conference
Year 2007
Where FCT
Authors Viviana Bono, Jaroslaw D. M. Kusmierek
Comments (0)