Split Capabilities: Making Capabilities Scale

Norman Hardy norm@netcom.com
Wed, 26 Jul 2000 21:34:07 -0700


At 14:03 -0700 00/07/26, Karp, Alan wrote:
>> Object-oriented
>> programming is much
>> less rich, much more narrow view of things. Adding facets
>> helps a bit but
>> why is this a good way to think about things?
>>
>> Best,
>>
>> -ken
>>
>
>I don't really care if it's objects as long as I can reason about the
>system.  Hidden side effects make reasoning difficult if not impossible.  I
>have a problem with facets in that interfaces not in the facet appear to me
>to be hidden side effects.  Objects, at least pure objects, don't have side
>effects, but any other such system would do as well for me.
>

Someone must indeed be able to reason about the system, or at least
the entire role of a particular counter. Take the case of the garage counter.
Probably the programmer of the code that requests a  counter instance
knows the semantics of the counter including its three facets.
He must also know all of the entrances and exits for the garage.
He must destribute the incrementer facet to each entry agent
and the decrement facet to each exit agent. These two agent
populations are identical and each agent instance gets
a thunk, which it invokes for each car. These agents or their
programmers need not know whether the car is comming or going.

Someone must indeed reason about the big picture.
But not all facet holders need to. Their contract merely requires
them to invoke the thunk, once for each car.

It is good that the programmer of the sqrt routine need not understand
that he is taking the quare root of a radius.
Norman Hardy  <http://www.mediacity.com/~norm>