title: Why is transparency valued over safety in the Composite pattern?
body: <p>I have just learned about the <a href="https://sourcemaking.com/design_patterns/composite" rel="nofollow noreferrer">Composite pattern</a>. As I understand, the main idea behind it is to treat both edges and nodes of a tree uniformly. This means that the "transparency" of the structure is valued more than the "safety", leading us to something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/jAZiJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jAZiJ.png" alt="enter image description here"></a></p>
  
  <p>I understand the concept, but can't think of situations when sacrificing safety for transparency would be a good choice to make. In other words, in which cases do we need transparency so badly that we are willing to make such a serious sacrifice?</p>