in reply to Re: Constructor/Factory Orthodoxy
in thread Constructor/Factory Orthodoxy
Your explanation of why Base classes should know nothing about their subclasses is convincing -- this has a ring of clarity and simplification to it that sounds compelling.
As others have mentioned elsewhere in this thread, there seems to be room here for a registry or manifest for children classes -- I think this is also an interesting approach that does not bleed knowledge of subclasses into their respective base classes, so long as the interface for the subclasses are the same.
BTW, the factories I had in mind were "horizontal" as you describe them (Gump and Wump were sibling subclasses of Bubba).
Thanks for your informative response,
Matt
|
|---|