Safe dynamic multiple inheritance

  • Authors:
  • Erik Ernst

  • Affiliations:
  • Department of Computer Science, University of Aarhus Aabogade 34, DK-8200 Århus N, Denmark

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

Quantified Score

Hi-index 0.00

Visualization

Abstract

Multiple inheritance and similar mechanisms are usually only supported at compile time in statically typed languages. Nevertheless, dynamic multiple inheritance would be very useful in the development of complex systems, because it allows the creation of many related classes without an explosion in the size and level of redundancy in the source code. In fact, dynamic multiple inheritance is already available. The language gbeta is statically typed and has supported run-time combination of classes and methods since 1997, by means of the combination operator '&'. However, with certain combinations of operands the '&' operator fails; as a result, dynamic creation of new classes and methods was considered a dangerous operation in all cases. This paper presents a large and useful category of combinations, and proves that combinations in this category will always succeed.