Smalltalk Objects

Now that we have this structure of forms connected to each other by two sided links we call distinctions, how does this relate to Smalltalk objects? Are objects more like a form, or more like a distinction? And in particular, what is the approach that best fits a reference finder?

On one hand, objects are distinctions in that they impose a boundary that forces us to send messages in order to interact with them. But, at the same time, the object contains its local names such as instance names. So, in as much as the object is a distinction, it also contains a form where all such local names exist.

Again, we find that objects exhibit dual behavior. However, we could try to model actual objects in terms of forms and/or distinctions. Which approach is best?

If we decided to model objects in terms of a distinction, then we would want to cross into it every time we needed to traverse its contents. In part, we take that for granted when we send messages, because Smalltalk is already providing for the automatic crossing of the object’s boundary. Thinking of an object as a distinction, thus, does not seem very convincing for our purposes.

So perhaps we should think of an object as a form with an implicit distinction around it, something like a read only form. We do not need write capabilities to travel from object to object anyway. Let’s try this out, and make a subclass of `Form` called `ObjectForm`. Since it is not meant to allow object modification, messages like `distinguish:` and `confuse:` can easily be implemented in terms of `self shouldNotImplement`.

But what about messages like `cross:`? How are we going to allow access to the object’s distinctions? What would the instance name distinctions hold in this case? What are the names of the distinctions inside an object’s form, from this point of view?

[…]