Misleading example [Factory Pattern]
kshirish opened this issue · 0 comments
kshirish commented
The example of factory pattern is misleading. Although the definition says,
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
But the example doesn't use any subclasses at all. Whereas, Addy Osmani's example explains it pretty well.