[DGD] Re: Recompiling object trees
Felix A. Croes
felix at dworkin.nl
Sat Feb 21 23:20:01 CET 1998
Erwin Harte <harte at harte.xs4all.nl> wrote:
>[...]
> When you want to 'upgrade' (as I call it, to distinguish between that
> and simply recompiling one object) you need to determine a list of all
> objects/programs that depend on it.
>
> This list is to be divided into two separate ones. The first is the
> list of inherited objects, the second is the list of leaf-objects, these
> are either objects of which clones have been made or other objects
> which are only used in their uncloned form, like rooms.
>
> At that point there's two ways to go about things. The way I did it in
> my own implementation is to destruct all the objects in the first list
> and then recompile all the ones in the second list which will cause the
> ones in the first list to be compiled again.
The reason for handling it this way is that DGD can recompile objects
without destructing them, but only if the object is not inherited.
By making sure that inherited objects are not used in any other
fashion, you can safely destruct them, and then recompile only those
objects which themselves are not inherited.
If inherited objects could also be used normally, you can neither
recompile them nor safely destruct them. There are, of course, also
other reasons for having inherited and non-inherited objects completely
separate.
Final note, the kernel library for DGD has been designed with all these
considerations in mind. In particular, the "object manager" discussed
in /doc/kernel/hook/driver is eminently suited for keeping track of
inherited-by relations.
Regards,
Dworkin
More information about the DGD
mailing list