[DGD] Recursion in recompile(), is this correct?

Noah Gibbs noah_gibbs at yahoo.com
Sat Jan 10 21:48:30 CET 2004


--- Robert Forshaw <iouswuoibev at hotmail.com> wrote:
> I'm not in a position to test it just yet because of
> the state of the rest 
> of the lib, so that's why I'm hoping someone can
> help me.

  Since whether this works depends on how you call it,
we don't really have enough information to go on here.
 More to the point, we don't really want to verify a
bunch of code that hasn't been tested.  That's not
really what the list is for.

  With that said:  I note that you are *always*
destructing the object, regardless of how the
recompile goes.  That's not what your comment says. 
So at the very least, your code and your comments
disagree.  It also seems a bit silly to bother
compiling the object if you're just going to destruct
it.

  Also:  since your recompile() function calls itself,
it's a bit much to call it on every item in the list. 
That means that any common parent classes (like,
inherited by more than one parent of your object) will
get recompile called on them repeatedly, which is
wasteful, at least the way you've coded it.

  Also, you're recompiling the parent before
destructing it.  I think that you can't directly
recompile an object if it has children.  I think you
get an error.  Maybe that's just the Kernel Lib,
though.



=====
------
noah_gibbs at yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list