Modularizing constructors
Viviana Bono, Dept. of Computer Science, Torino University
Jaroslaw D. M. Kusmierek, Institute of Informatics, Warsaw University
|
 |
REFEREED
PAPER

PDF Version |
Abstract
Object-oriented class-based languages provide mechanisms for the initialization of newly
created objects. These mechanisms specify how an object is initialized and what information
is needed to do so. The initialization protocol is usually implemented as a list
of constructors. It is often the case that the initialization protocol concerns some orthogonal
properties of objects. Unfortunately, if those properties have more than one option
of initialization, the total number of constructors becomes exponential in the number
of properties.
In this paper, we propose an alternative protocol. In our approach, instead of defining
a list of constructors, it is possible to split blocks of definitions into smaller and composable
pieces, in order to obtain reduction in the size of the code, better reusability, more
expressiveness, and easier maintenance.
Note: Due to the typographical sophistication of this article, no HTML version is available. Please use the PDF version.
About the authors

|
|
Viviana Bono is an Associate Professor in Computer Science at the University of Torino, Italy. Her main research interests are theoretical foundations, semantics, and design of object-oriented and functional languages. She can be reached at bono@di.unito.it and at http://www.di.unito.it/~bono. |
 |
|
Jaroslaw Dominik Mateusz Kusmierek is a PhD student in Computer Science at the University of Warsaw, Poland. His main research interests are the base concepts and the design of object oriented languages, and the component oriented approach to software development. He can be reached at jdk@duch.mimuw.edu.pl. |
Cite this document as follows: Viviana Bono and Jaroslaw D. M. Kusmierek: "Modularizing constructors",
in Journal of Object Technology, vol. 6, no. 9, Special Issue: TOOLS EUROPE 2007,
October 2007, pages 297-317, http://www.jot.fm/issues/issue_2007_10/paper15/
|