in reply to Re^2: Automatic vivification of an object
in thread Automatic vivification of an object

Although I don't want to discourage the development of a solution if it works, is tested, and is useful, I tend to agree that it sounds like your problem might have a more direct solution, by updating the OO design. If a parent class needs access to a subclass's property, an abstract accessor is a solution, and if a subclass needs access to a parent, then an accessor should do. As for a class offering an instance of itself, maybe a short example would help to see what you're doing. Maybe there is some other thing that could be delayed from initialization time to runtime whose solution would come more naturally.
  • Comment on Re^3: Automatic vivification of an object

Replies are listed 'Best First'.
Re^4: Automatic vivification of an object
by bounsy (Acolyte) on Jan 15, 2015 at 18:59 UTC

    The problem is not how to get to the data. The problem is when to get to the data. Even with accessors and abstract accessors, I need to defer until compilation of the modules is complete before I try to use the accessors. That's why I was looking for a way to defer initialization and came up with the automaic vivification method I started with.