Object-oriented composition untangled

  • Authors:
  • Klaus Ostermann;Mira Mezini

  • Affiliations:
  • Siemens AG, Corporate Technology SE 2, D-81730 Munich, Germany;Darmstadt University of Technology, D-64283 Darmstadt, Germany

  • Venue:
  • OOPSLA '01 Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Object-oriented languages come with pre-defined composition mechansims, such as inheritance, object composition, or delegation, each characterized by a certain set of composition properties, which do not themselves individually exist as abstractions at the language level. However, often non-standard composition semantics is needed, with a mixture of composition mechanisms. Such non-standard semantics are simulated by complicated architectures that are sensitive to requirement changes and cannot easily be adapted without invalidating existing clients. In this paper, we propose compound references, a new abstraction for object references, that allows us to provide explicit linguistic means for expressing and combining individual composition properties on-demand. The model is statically typed and allows the programmer to express a seamless spectrum of composition semantics in the interval between object composition and inheritance. The resulting programs are better understandable, due to explicity expressed design decisions, and less sensitive to requirement changes.