4.3 Object-oriented omissions

The object model developed in this chapter and in Chapter 3 is fairly complete. Objects are prevented from interfering with one another, as they may only access the state of another object through the interfaces it implements (realizing encapsulation).1 Also, objects can have many “personalities” by implementing multiple interfaces (realizing polymorphism, which dynamic dispatch makes possible). A few aspects that are often part of object models have been omitted, though, and these aspects are discussed in this section.


  1. Malicious code can, of course, easily wreak havoc with the internal state of any accessible object, but this is true for all object models implemented in native code, including C++. The point is, though, that the object model, properly used, prevents such access.