Split Capabilities: Making Capabilities Scale
Ralph Hartley
hartley@AIC.NRL.Navy.Mil
Fri, 28 Jul 2000 09:05:55 -0400
> There seems to be some confusion as to what I'm talking about. There is an
> object O with some interface. There are facets of O that represent
> thinnings of that interface. I agree there is no problem if the programmer
> of some other object knows the interface to O. If the programmer only knows
> a facet of O, he may not be able to correctly code his object.
Why not? A facet of an object, like an object itself only needs to
fulfill its contract. The user of the facet (or object) makes an error
if he assumes anything about its behavior that is not specified by the
contract. Are you claiming that an object's contract must COMPLETELY
specify its behavior?
For instance the contract for the "do" method might state "The do
method changes the value of getX(). Immediately after its execution
the value of getX() is different than immediately before. Any side
effects of changing this object (if any) are guaranteed to take
place."
Given that contract there are some inferences one can make about the
behavior of the object. One can not however predict the actual value.
The contract also does not say that the value will not change at other
times.
The lack of complete specification may be there to give the
implementor more freedom, or it may be put there for a reason.
Consider a partial information game. Each player may not know all the
effects of his moves. He may also not know how many other players
there are or what their legal moves are. Given some information about
these things such games can be quite complex, even with very simple
rules.
Ralph Hartley