An object encoding translates a language with object primitives to one with
out. Similarly, a class encoding translates classes into other primitives.
Both are important theoretically for comparing the expressive power of lang
uages and for transferring results from traditional languages to those with
objects and classes. Both are also important foundations for the implement
ation of object-oriented languages as compilers typically include a phase t
hat performs these translations.
This paper describes a language with a primitive notion of classes and obje
cts and presents an encoding of this language into one with records and fun
ctions. The encoding uses two techniques often used in compilers for single
-inheritance class-based object-oriented languages: the self-application se
mantics and the method-table technique. To type the output of the encoding,
the encoding uses a new formulation of self quantifiers that is more power
ful than previous approaches.