Dynamic inheritance in a statically typed language

  • Authors:
  • Erik Ernst

  • Affiliations:
  • DEVISE - Center for Experimental Computer Science, University of Århus, Department of Computer Science, DK-8000 Århus C, Denmark

  • Venue:
  • Nordic Journal of Computing
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

There is a long-standing schism in object-orientation between the safe but rigid statically typed languages, and the flexible but less safe dynamically typed languages. This paper presents an enhancement of the flexibility and expressive power of a statically typed language, based on an inheritance mechanism which allows both compile-time and run-time construction of classes, as well as dynamic specialization of objects. This enhanced flexibility supports better separation of concerns in large systems and allows for more elegant and maintainable designs. Submethoding-inheritance applied to behavioral descriptors--has been used for the construction of control structures for many years, in BETA. With dynamic inheritance, submethoding becomes more expressive, supporting control structures as first class values which may be constructed and combined dynamically. Even though the concept of submethoding is missing from most other languages, the basic idea could be applied to any statically typed object-oriented language.