A minimalist approach to objects

  • Authors:
  • John C. Lusth;R. Sean Bowman

  • Affiliations:
  • Department of Computer Science and Computer Engineering, University of Arkansas, 317 Engineering Hall, Fayetteville, AR 72701, USA;Department of Computer Science and Computer Engineering, University of Arkansas, 317 Engineering Hall, Fayetteville, AR 72701, USA

  • Venue:
  • Computer Languages, Systems and Structures
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamically typed environment-passing interpreters (EPIs), such as Scheme, are known for their small footprint. In this era of ubiquitous computing, there is an advantage for providing in situ programming support for systems having limited resources. Thus, EPIs may play an important role in programming embedded systems, especially with system-on-a-chip approaches. It is desirable that embedded interpreters be full featured, such as including an object system. By taking a view that equates function definitions with classes and environments with objects, it is shown how any EPI having functions and environments as first-class objects can be made object-oriented with a strong inheritance model through the addition of proxies and judicious use of dynamic scope and/or assignment. Moreover, the sum total of the necessary changes is surprisingly small. The result is an object-oriented interpreter with little additional cost in terms of interpreter size or specialized syntax.