Home > Articles > Programming

  • Print
  • + Share This
From the author of

Influence on Object Orientation

For a long time, the terms class-based and object-oriented were used almost interchangeably. Self, in 1987, was the first object-oriented language that wasn't class-based. Self was relatively obscure, although its direct descendant, JavaScript, is somewhat better known. Almost all other object-oriented languages have been class-based. Even languages like Self and JavaScript, which don't provide classes as part of the language, often have them implemented on top.

Many of the concepts that are commonly associated with object orientation come from Simula, as do a number of common design patterns. Simula's virtual function calls are semantically very similar to message sends in an object-oriented language, and it's quite common to use Simula terminology when referring to components of objects.

Simula influenced some languages more than others. C++, for example, was originally called "C with Classes" and was intended as a way of using Simula concepts in C, just as Objective-C was created to bring Smalltalk concepts to C.

In languages like Java and Objective-C, which are members of the Smalltalk family, objects are always passed by reference and must be copied explicitly. This model comes directly from Simula, in contrast with ALGOL, where records were frequently copied rather than being aliased.

Unlike object-oriented languages, Simula didn't really provide data-hiding. Objects exposed all of their fields to any caller. You could implement something like hidden fields in the same way that you're forced to do by C++: by implementing an abstract superclass with factory methods that return private subclasses.

  • + Share This
  • 🔖 Save To Your Account