title: Difference aggregation, acquaintance and composition (as used by Gang Of Four)
body: <p>I have been reading <em>Design Patterns: Elements of Reusable Object-Oriented Software</em> by Erich Gamma et al. and got to the part explaining <em>aggregation</em> and <em>acquaintance</em> (page 22-23). Here is an excerpt (sorry if it is too long but I deemed all of it to be important to explain this question):</p>
  <blockquote>
  <p>Consider the distinction between object <strong>aggregation</strong> and <strong>acquaintance</strong> and how differently they manifest themselves at compile- and run-times. Aggregation implies that one object owns or is responsible for another object. Generally we speak of an object <em>having</em> or being <em>part of</em> another object. Aggregation implies that an aggregate object and its owner have identical lifetimes.</p>
  <p>Acquaintance implies that an object merely <em>knows of</em> another object. Sometimes acquaintance is called ”association” or the “using” relationship. Acquainted objects may request operations of each other, but they aren’t responsible for each other. Acquaintance is a weaker relationship than aggregation and suggests much looser coupling between objects.</p>
  <p>[…]</p>
  <p>Ultimately, acquaintance and aggregation are determined more by intent than by explicit language mechanisms. The distinction may be hard to see in the compile-time structure, but it's significant. Aggregation relationships tend to be fewer and more permanent than acquaintance. Acquaintances, in contrast, are made and remade more frequently, sometimes existing only for the duration of an operation. Acquaintances are more dynamic as well, making them more difficult to discern in the source code.</p>
  </blockquote>
  <p>The confusing part for me is that <em>aggregation</em> described here has traits of <em>composition</em>: a composing object <em>manages</em> other objects and their lifetimes are bound.</p>
  <p>On the other hand <em>acquaintance</em> defined in that excerpt has traits of <em>aggregation</em>: an aggregating object <em>knows about</em> other objects but it does not manage them.</p>
  <p>Also the part</p>
  <blockquote>
  <p>Sometimes acquaintance is called “association” or the “using” relationship.</p>
  </blockquote>
  <p>is confusing as I thought that both <em>aggregation</em> and <em>composition</em> are forms of <em>association</em> with <em>aggregation</em> being the less coupling one.</p>
  <p>Can it be that the authors are referring to <em>aggregation</em> as <em>acquaintance</em> and to <em>composition</em> as <em>aggregation</em>, or am I missing something?</p>