jdhedden:
This is a highly unorthodox notion, and indicates to me that perhaps you should reconsider your object design. Regardless, you could accomplish this by creating a 'new' method in your sub class that provided the argument. However, this is not recommended due to the nature of how OIO operates.
I do not understand this response. Derived classes very often pass parameters on to their base classes as part of construction. These parameters can be:
1) User supplied and passed as part of the creation of the derived class
2) Supplied by the derived class to the base class, to specialize or select functionality of the base class. These can be further subdivided into:
a) Constant(s)
b) Dynamic parameters that are based on constants and/or the user's parameters to the derived
class' creation function (constructor)
I understand your response with regard to how to do this for single inheritance (new method in sub-class providing the argument), but I think such a mechanism should be allowed for multiple-inheritance as well, for those of us who like to implement functionality in more than one base class. C++ allows this, for example, and it is a facility that is used by quite a few class libraries / frameworks.
I also understand the notion of first constructing a base class object and then modifying its behavior using its own functions. However, I also believe in single step construction, unless absolutely not possible. In fact, to use your lingo, I think it is a highly unorthodox notion to be forced to construct a base class in multiple steps (i.e. to construct it with one invariant state and then to be forced to modify it to a second, potentially vastly different, final invariant state).
Finally, issues of OO correctness aside, just how hard would it be to add such functionality to Object::InsideOut?
Thanks,
Michael Goldshteyn
(2)
]
