[cap-talk] "Composite", was "Same" key

Karp, Alan H alan.karp at hp.com
Mon Feb 19 14:13:22 CST 2007


David Hopwood wrote:
> 
> # Like an individual object, a composite is a combination of 
> state and behavior.
> 
> So "the thing that encapsulates state and methods" does not 
> clearly distinguish
> between 'foos' and 'bars'. They both encapsulate state and 
> methods, although
> the state and methods of a 'foo' are all associated with a 
> single language-level
> entity, whereas the state and methods of a 'bar' are 
> distributed among several
> language-level entities that are being described at a higher level.
> 
I understand those definitions.  I was trying to make a different point.
Given an object/composite/abstraction bar, a programmer creates a new
object foo that forwards some of the messages that bar accepts but has
no state or methods of its own.  It is reasonable for the programmer to
refer to foo as a facet of bar.

_________________________
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