Skip to content

The origin of the term class

Today I spent a few hours trying to find out the origin of the term class known from object-oriented programming. I wanted to find out who invented the term, in what paper the term was first introduced and what the term actually means.

My own little theory has always been that the term class has something to do with equivalence classes from set theory. It's probably not right, but I like the idea that the types of classes in a program partition the set of all possible types in a program kinda like equivalence classes partition a set. Yeah, I know that this is not thought all the way through.

Anyway, I failed to find the origin of the term but I think I came reasonably close. After reading through 20 years of comp.object and through several papers from the 60s and 70s here's what I found out.

Let's start with the paper "The development of the SIMULA languages" written by the SIMULA designers Kristen Nygaard and Ole-Johan Dahl. It was published in ACM SIGPLAN Notices, Vol. 13, No.8 in August 1978. The paper, which gives a brief history of the SIMULA languages, contains the following paragraph.

A declaration giving rise to a class of objects might well have been called an "object class" (in analogy with Hoare's record class). In choosing the shorter term "class" we felt that we had a good terminology which distinguished clearly between the declared quantity (the class) and its dynamic offspring (the objects). Our good intentions have not quite worked out, however. Many users tend to use the term "class", or perhaps "class instance", to denote an object, no doubt because "object" does not occur as a reserved word of the language. (As an afterthought, anno 1978, we might have insisted that all class declarations must be prefixed, and defined a primitive outermost prefix "object" containing detach and resume as local procedures. See also (Wang and Dahl 1971)).

From what I read elsewhere Nygaard and Dahl possibly used the term class the first time in the "Class and subclass declaration", paper they presented at the IFIP Working Conference on Simulation Programming Languages, Oslo 1967.

Anyway, we learn that the term class was inspired by C.A.R. Hoare's term "record class". That term was introduced by Hoare two years earlier, in November 1965. I believe the relevant paper is "Record Handling", published in ALGOL Bulletin (Issue 21). Here's where the term is introduced.

Each record in the computer must belong to one of a limited number of disjoint record classes; the programmer may declare as many record classes as he requires, and he associates with each class an identifier to name it. A record class name may be thought of as a common generic term like "cow", "table" "house", and the records which belong to these classes represent the individual cows, tables and houses with which a particular activation of a program is concerned. It is obvious that no object can be both a cow and a table, so it is quite natural to insist that every record shall belong to one and only one class.

Sounds promising. But a few pages further down there's the following brief note.

The availability of ambiguous references fulfills a similar function to McCarthy's proposed class union declaration from which the idea has been taken.

So John McCarthy used the term "class union" before. This might be relevant. Maybe Hoare's use of the word class comes from there. Unfortunately I can't find anything of value about this term. Especially not from McCarthy.

This is where my little search ends for now. Apparently Nygaard, Dahl, Hoare and possibly McCarthy were co-creators of the term class. Maybe the etymology of the term is even more complex, depending on what McCarthy's class unions are. Maybe I'll find out one day.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
BBCode format allowed
Form options

Submitted comments will be subject to moderation before being displayed.