This chapter provided an overview of structural patterns.
This chapter opened with a composite pattern. This pattern describes how to create an interface that doesn't make a distinction between a basic object and a composite object that is composed of more basic or composite objects. It is especially appropriate when we are operating on tree structures.
The next pattern was flyweight. It is different than other structural patterns because of its focus on memory usage. The flyweight pattern tells us how to share static data between multiple objects to reduce memory usage. This chapter also discussed a practical implementation of this pattern: a string interning, and explored Delphi concepts of equality comparers and hashers.
Next on the list was marker interfaces. This pattern enables metadata annotation in languages that don't provide specific metadata features. In later years, it was mostly replaced with language-specific approaches. In Delphi, we can use attributes to annotate metadata...