On Wed, 26 Mar 2008 06:26:42 -0700 (PDT), Eric Hughes wrote:
> Is there any way of getting in-place initialization for non-limited
> objects?
[...]
It is both simpler and more complex. What is IMO needed:
1. Extensible operations. (That is when a primitive operation has
non-overridable parts, like constructors, destructors, assignments,
aggregates usually do.)
2. Assignment (a part of) as a doubly dispatching primitive operation. (In
order to have access to LHS and RHS, which is one problem in your example)
3. Constructor (a part of) as a primitive operation. (Again, to access
LHS,
which is another problem you have)
4. Multi-stage construction/assignment model. (In order to handle
discriminants before allocation, allocation before components
initialization and components before assignment completion)
----------
P.S. Supertypes, classes for all types, multiple inheritance. These will
give you a way to hang your tracing stuff on any existing type rather than
deriving them from a common base.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


|