Nesting in an Object-Oriented Language is NOT for the Birds

  • Authors:
  • Peter A. Buhr;C. Robert Zarnke

  • Affiliations:
  • -;-

  • Venue:
  • ECOOP '88 Proceedings of the European Conference on Object-Oriented Programming
  • Year:
  • 1988

Quantified Score

Hi-index 0.00

Visualization

Abstract

The notion of nested blocks has come into disfavour or has been ignored in recent program language design. Many of the current object oriented programming languages use subclassing as the sole mechanism to establish relationships between classes and have no general notion of nesting. We argue that nesting (and, more generally, hierarchical organization) is a powerful mechanism that provides facilities that are not otherwise possible in a class based programming language. We agree that traditional block structure and its associated nesting have severe problems, and we suggest several extensions to the notion of blocks and block structure that indirectly make nesting a useful and powerful mechanism, particularly in an object oriented programming system. The main extension is to allow references to definitions from outside of the containing block, thereby making the contained definitions available in a larger scope. References are made using either the name of the containing entity or an instance of the containing entity. The extensions suggest a way to organize the programming environment for a large, multi-user system. These facilities are not available with subclassing, and subclassing provides facilities not available by nesting; hence, an object oriented language can benefit by providing nesting as well.