paper

Organizing Programs Without Classes

  • Authors:

📜 Abstract

All organizational functions carried out by classes can be accomplished in a simple and natural way by object inheritance in classless languages, with no need for special mechanisms. A single model—dividing types into prototypes and traits—supports sharing of behavior and extending or replacing representations. A natural extension, dynamic object inheritance, can model behavioral modes. Object inheritance can also be used to provide structured name spaces for well-known objects. Classless languages can even express “class-based” encapsulation. These stylized uses of object inheritance become instantly recognizable idioms, and extend the repertory of organizing principles to cover a wider range of programs.

✨ Summary

The paper argues that classes are not necessary for organizing large object-oriented programs. In the SELF model, a concrete data type is represented by a prototypical object containing instance-specific state and a separate traits object containing shared behavior. Refining traits objects provides differential programming analogous to subclassing. Data parents provide explicit representation extension, while omitting data parents allows a subtype to replace or alter its inherited representation without inheriting unwanted state.

The paper further presents dynamic inheritance as a way to represent behavioral modes whose implementation changes with object state. It describes encapsulation based on the relationship between traits objects and their descendants, thereby approximating type-based privacy without explicit classes. Finally, it uses ordinary objects as structured namespaces and category containers for naming, browsing, and organizing globally accessible objects and methods.

The paper’s main lasting contribution is the articulation of recognizable prototype-based organizational idioms—especially the separation of prototypes from traits and the use of inheritance for behavior sharing, representation control, dynamic modes, encapsulation, and namespaces. The SELF documentation continues to identify the paper as a foundational work in the language’s literature. (bibliography.selflanguage.org) A later research language, V, explicitly cites the paper in its discussion of trait-based systems and develops a trait-based type system for extensible record accessors, providing concrete evidence of conceptual reuse in subsequent programming-language research. (researchgate.net) Research literature on composable traits also lists the paper among the antecedents of later trait systems. (scg.unibe.ch) The search did not establish a specific commercial product whose design can be attributed directly to this paper.