in reply to Re: Re: Constructor/Factory Orthodoxy
in thread Constructor/Factory Orthodoxy

re-blessing doesn't mean you violate parent-knowledge behavior. In fact, Policy, Manifest, and/or Factory classes would be a better way of doing this.
  1. Create a file object.
  2. The file object, during construction, finds out it's a directory.
  3. The file object will then either:
    • Ask the Factory to for the classname to rebless to
    • Give itself to the Factory and asks to be reblessed
The factory or policy or manifest should be the one that maintains that knowledge and how to transform.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.