Expressive, Efficient Instance Variables
Jeffrey Dean,
David Grove,
Craig Chambers, and
Vassily Litvinov
The decoupling of clients of abstractions from the
implementations of those abstractions is a key benefit of object-oriented
programming. However, many object-oriented languages provide instance variables
in such a way that implementation-level representation decisions seep through
interfaces, introducing coupling between clients and abstractions. As part of
the Cecil language, we have developed a semantics for flexible instance
variables based on the principle that a class should be decoupled from its
clients, its subclasses, and its role extensions. We describe our design of
instance variables and provide examples where their additional flexibility has
been useful. However, implementing our semantics naively can impose significant
performance penalties. To achieve reasonable performance, we have developed a
number of optimizations that are effective at eliminating many of the costs of
our flexible model. We discuss these optimizations and report on the results of
experiments to assess the costs of our design under different optimization
scenarios.
February 1996.
To get the PDF file, click here.
Cecil/Vortex
Project