Classification of Actions or Inheritance also for Methods

Authors

  • Bent Bruun Kristensen
  • Ole Lehrmann Madsen
  • Birger Møller-Pedersen
  • Kristen Nygaard

DOI:

https://doi.org/10.7146/dpb.v16i231.7587

Abstract

The main thing with the sub-class mechanism as found in languages like C++, SIMULA and Smalltalk is its possibility to express specializations. A general class, covering a wide range of objects, may be specialized to cover more specific objects. This is obtained by three properties of sub-classing: An object of a sub-class inherits the attributes of the super-class, virtual procedure/method attributes (of the super-class) may be specialized in the sub-class, and (in SIMULA only) it inherits the actions of the super-class.

In the languages mentioned above, virtual procedures/methods of a super-class are specialized in sub-classes in a very primitive manner: they are simply re-defined and need not bear any resemblance of the virtual in the super-class. In BETA, a new object-oriented language, classes and methods are unified into one concept, and by an extension of the virtual concept, virtual procedures/methods in sub-classes are defined as specializations of the virtuals in the super-class. The virtual procedures/methods of the sub-classes thus inherit the attributes (e.g. parameters) and actions from the ''super-procedure/method''.

In the languages mentioned above only procedures/methods may be virtual. As classes and procedures/methods are unified in BETA this gives also virtual classes. The paper demonstrates, how this may be used to parameterize types and enforce constraints on types.

Author Biographies

Bent Bruun Kristensen

Ole Lehrmann Madsen

Birger Møller-Pedersen

Kristen Nygaard

Downloads

Published

1987-01-01

How to Cite

Kristensen, B. B., Madsen, O. L., Møller-Pedersen, B., & Nygaard, K. (1987). Classification of Actions or Inheritance also for Methods. DAIMI Report Series, 16(231). https://doi.org/10.7146/dpb.v16i231.7587