A.M. TURING AWARD WINNERS BY...

Ole-Johan Dahl DL Author Profile link

Norway – 2001
Additional Materials

Object-Oriented Programming

Object-oriented programming traces its origins to the ideas of Dahl and Nygaard as realized in the SIMULA languages. In the intervening years object-oriented programming has evolved, along with our understanding of the programming problem and the nature of the tasks that programmers assume.

The major contribution of SIMULA was the class concept, which in turn was inspired by the Algol 60 block. Dahl generalized the Algol block, first by freeing blocks from the “stack discipline”. What does this mean? In Algol, no block could outlive its caller; this allowed blocks to be represented in the computer's memory by a very efficient structure known as a stack, but it also limited their power. Dahl's creation of an alternative storage management package “based on a two-dimensional free area list” made possible the Simula class [7]. This package seems to have been completed by May 1963, the date of a preliminary presentation of the SIMULA I language. Once block activations had been given an independent existence, it was natural to include a mechanism to refer to them; this is the origin of the object reference.

In SIMULA 67 these generalized blocks were named classes. Dynamic activations of classes were called instances of the class, or objects. This gave the new language the following features:

  1. Record structures: instances of blocks that have variable declarations but no statements.
  2. Procedural data abstractions: instances of blocks that have both variable and procedure declarations, but are liberated from the stack discipline so that they can outlast their callers.
  3. Processes: instances of blocks that continue to execute after that have been “detached”, that is, after control has returned to their callers.
  4. Prefixing of an ordinary Algol-60–style in-line block with the name of another class; this allowed the prefix class to play the role of what Dahl called a context object.
  5. Prefixing a class declaration D with the name of another class P. In SIMULA 67, D was called a subclass of P, and D's objects enjoyed the concatenation of the features of P and D.
  6. As well as adding to a superclass as described in item 5, a subclass could also change—override— features of its superclass. For this to be possible, the feature had to be designated as virtual in the superclass.

Today, item 4 is called packaging, modularity, or language levels. Items 5 and 6 are the key ideas behind inheritance, a language feature that improves understandability and reusability.

This list of features might lead one to think that the real contribution of SIMULA was the class construct, and that object-oriented programming is nothing more than class-oriented programming. I don’t believe that this is correct, either historically or pragmatically. Dahl himself wrote

“I know that Simula has been criticized for perhaps having put too many things into that single basket of class. Maybe that is correct; I’m not sure myself. … It was great fun to see how easily the block concept could be remodeled and used for all these purposes. It is quite possible, however, that it would have been wiser to introduce a few more specialized concepts, for instance, a “context” concept for the context-like classes.[3]

The term “object-oriented programming” was coined by Alan Kay during the development of Smalltalk, another language that played a major role in popularizing these ideas. Those familiar with the modern use of the term will see that all of its main concepts were present in SIMULA 67. Of course, it took some time for these ideas to become widely accepted.

Today, as the above quotation from Dahl foreshadows, the distinct features of object-oriented programming are more important than whether or not they share a common implementation as a single linguistic construct called a class.

Indeed, some object-oriented languages, such as Self and JavaScript, have objects but no classes. Many languages that support classes and objects, such as C++, also allow programmers to use classes as record structures, although this use is now regarded as not truly object-oriented. Inheritance or its equivalent (items 5 and 6 above) has become the sine qua non of object-orientation, although languages differ as to whether the control of overriding is given to the superclass or to the subclass. The special value of inheritance is that it allows complex program structures to be built, and later understood, incrementally, and that it allows variants of these structures to be defined for differing purposes by specifying only the variations, and not the whole complex construction.

Objects incorporating the ideas of procedural data abstraction and inheritance have been adopted by a flood of successor languages, including Smalltalk, Objective C, Beta, Eiffel, C++, C#, Java, O'Caml, Scala, Python and Ruby. The “object-oriented” style of programming that these languages make possible is the dominant style of programming for industrial and commercial applications.

Objects as processes, and classes as modules, have not been as widely adopted, although the Actor family of languages focusses on the process facet of objects, and the Newspeak language uses classes as modules.