On this page:
Object-Oriented Programming Languages:   Application and Interpretation

Object-Oriented Programming Languages: Application and Interpretation

Éric Tanter

last updated: Thursday, June 22nd, 2023

Copyright © 2010-2023 by Éric Tanter

The electronic version of this work is licensed under the Creative Commons Attribution Non-Commercial No Derivatives License

This booklet exposes fundamental concepts of object-oriented programming languages in a constructive and progressive manner. It follows the general approach of the PLAI book by Shriram Krishnamurthi (or at least I’d like to think it does). The document assumes familiarity with the following Parts of PLAI: I-V (especially first-class functions, lexical scoping, recursion, and state), as well as XII (macros).

OOPLAI is also available in PDF version. Note however that OOPLAI is subject to change at any time, so accessing it through the web is the best guarantee to be viewing the latest version.

I warmly welcome comments, suggestions and fixes; just send me a mail!

As of June 2018, OOPLAI has been translated to Chinese by ChongKai Zhu.

Acknowledgments: I am thankful to the members of the PLEIAD lab and the students of the Programming Languages course at University of Chile for detecting bugs and suggesting enhancements.

    1 From Functions to Simple Objects

      1.1 Stateful Functions and the Object Pattern

      1.2 A (First) Simple Object System in Scheme

      1.3 Constructing Objects

      1.4 Dynamic Dispatch and Polymorphism

    2 Looking for the Self

      2.1 What is Self?

      2.2 Self with Macros

      2.3 Mutually-Recursive Methods

      2.4 Nested Objects

    3 Benefits and Limits of Objects

      3.1 Abstract Data Types

      3.2 Procedural Representations

      3.3 Objects

        3.3.1 Object Interfaces

        3.3.2 Principles of Object-Oriented Programming

        3.3.3 Extensibility

        3.3.4 What about Java?

      3.4 The Extensibility Problem

        3.4.1 ADT

        3.4.2 OOP

      3.5 Different Forms of Data Abstraction

    4 Forwarding and Delegation

      4.1 Message Forwarding

      4.2 Delegation

      4.3 Programming with Prototypes

        4.3.1 Singleton and Exceptional Objects

        4.3.2 Sharing through Delegation

      4.4 Late Binding of Self and Modularity

      4.5 Lexical Scope and Delegation

      4.6 Delegation Models

      4.7 Cloning

    5 Classes

      5.1 Sharing Method Definitions

      5.2 Accessing Fields

      5.3 Classes

      5.4 Embedding Classes in Scheme

        5.4.1 Macro for Classes, Take 1

        5.4.2 Macro for Classes, Take 2

        5.4.3 Example

        5.4.4 Strong Encapsulation

      5.5 Initialization

      5.6 Anonymous, Local and Nested Classes

    6 Inheritance

      6.1 Class Hierarchy

      6.2 Method Lookup

      6.3 Fields and Inheritance

        6.3.1 Inheriting Fields

        6.3.2 Binding of Fields

        6.3.3 Field Shadowing

      6.4 Super Sends

      6.5 Inheritance and Initialization

    7 A World of Possibilities

      7.1 Interfaces

      7.2 Mixins