How Objects Interact

The actions within an object are its only interface to other objects. Actions form a kind of "wall" that encapsulates the object, and shields its internal information from outside objects. This shielding is called information hiding. Information hiding protects an object's data from corruption by outside objects, and also protects outside objects from relying on another object's private data, which can change without warning.

One object can act upon another (or cause it to act) only by calling that object's actions, namely by sending messages. Objects respond to these messages by performing an action, returning data, or both. A message to an object must specify:

So the message format looks like this:

object~action(parameters)

Assume that the object is the string !iH. Sending it a message to use its REVERSE action:

"!iH"~reverse

returns the string object Hi!.