[cap-talk] "Composite", was "Same" key
Karp, Alan H
alan.karp at hp.com
Fri Feb 16 11:52:05 CST 2007
I've been reading this discussion with interest since MarkM and I
periodically argue over what an object is.
To me, an object encapsulates state and methods. A facet is a
particular view of that state and those methods. The holder of a
reference to a facet treats it no differently than a reference to any
other object. From this point of view a facet is an object, and it is
often implemented that way in object capability systems.
However, a facet is more than just another object from the point of view
of the creator of the facet. The facet is a means to expose part of the
state and methods of some object while hiding the rest from the holder
of the reference to the facet. Such a facet has no state or logic of
its own. It is used solely of a means of reducing the interface. Also,
the interface of the facet may be something that can be further reduced.
In this sense, "facet of an object" is exactly the right terminology,
while "atomic object" is not.
So, from the point of view of the holder of a reference, it's just a
reference to an object. From the point of view of the creator of an
object with no state and logic of its own that only forwards invocations
to an underlying object, it's a facet.
Things get trickier when the facet does have state and methods of its
own, such as an logging forwarder or a caretaker that only exposes some
of the methods of the object it forwards to. I think it is fair for the
creator of such an object to call it a facet of the underlying object as
long as the facet's methods and state don't interact with the behavior
of the underlying object, perhaps other than blocking access to it. The
logging and caretaker patterns satisfy this requirement. Of course, we
can then also talk about the logging or revoker facet of this object.
So, to the invoker, it is just objects all the time. For the creator,
it is objects and facets of these objects.
_________________________
Alan Karp
Principal Scientist
Virus Safe Computing Initiative
Hewlett-Packard Laboratories
1501 Page Mill Road
Palo Alto, CA 94304
(650) 857-3967, fax (650) 857-7029
https://ecardfile.com/id/Alan_Karp
http://www.hpl.hp.com/personal/Alan_Karp/
More information about the cap-talk
mailing list