An Efficient Reference Finder

* Preliminaries

The previous chapter illustrates how much you can obtain from refactoring when your working hypotheses apply to every occurrence of a particular pattern. This is because it becomes possible to arrange things such that there are no special cases that get in the way of clear expression of intention. In other words, it is a matter of choosing your point of view carefully.

And indeed, your point of view determines what things you will see and what things you will ignore. Your point of view is implied by your intentions because it determines what distinctions you perceive.

We should exercise our skills to choose points of view artfully. And since we have discussed information spaces and traversals quite a bit, it is time to put a reflexive twist on them. Let’s consider the traversal of the information space implied by the Smalltalk image by writing a reference finder.