thgs, (edited ) Static constructors or a factory class? Which one you tend to prefer.
The factory method, as a pattern seems convenient for me as you can have a private constructor and guard different ways to construct an object with a different static method. However, factory method is meant for subclassing.
On the other hand, a factory, in some cases will leave unguarded the constructed object.
Feel free to elaborate on why.
Add comment