I have just learned about the Composite pattern. As I understand, the main idea behind it is to treat both, edges and nodes of a tree alike. This means, that the "transparency" of the structure is valued more, than the "safety", leading us to something like this:
I understand the concept, but can't think of ways, 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?
Aucun commentaire:
Enregistrer un commentaire