Design patterns and object creation
One of the most popular topics in Object-Oriented Programming is design patterns. They are known as reusable solutions to commonly occurring software design problems. Each pattern is identified by a name and describes a situation where components need to interact with each other to achieve a specific goal.
Note
Design patterns became popular in the mid-nineties after the publishing of the book Design Patterns: Elements of Reusable Object-Oriented Software by the so-called Gang of Four (GoF): Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.
The patterns are described so that they can be reused regardless of the language used to implement it. However, the original patterns and the subsequent ones added in the following years were mainly described for classical Object-Oriented languages. So often, they are described in terms of classes, interfaces, and other traditional constructs. Due to lack of native support for some classical OOP constructs...