Statically Typed Friendly Functions via Partially Abstract Types

Benjamin C Pierce and David N Turner

Abstract: A well-known shortcoming of the object model of Simula and Smalltalk is the inability to deal cleanly with methods that require access to the internal state of more than one object at a time. Recent language designs have therefore extended the basic object model with notions such as friends' methods and protected features, which allow external access to the internal state of objects but limit the scope in which such access can be used. We show that a variant of this idea can be added to any type-theoretic model of the basic object-oriented mechanisms (encapsulation, message passing, and inheritance), using a construction based on Cardelli and Wegner's partially abstract types, a refinement of Mitchell and Plotkin's type-theoretic treatment of abstract types.

LFCS report ECS-LFCS-93-256, April 1993.

Previous | Index | Next