3 ms·
Then you aren't gaining anything over simply calling 'new' on that class, negating the point of the factory pattern, right?
by mhansen 17y ago
Then you aren't gaining anything over simply calling 'new' on that class, negating the point of the factory pattern, right?
- orangecat 17y agoThe point of the factory pattern is that you don't always want a new instance, and you don't always want a specific type. "new Foo()" necessarily does both, while Foo.new() can potentially do neither.