Re: New destructors implementation

From: Date: Tue, 10 Feb 2004 09:49:37 +0000
Subject: Re: New destructors implementation
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-7688@lists.php.net to get a copy of this message
Andi Gutmans wrote:
At 03:55 PM 2/9/2004 +0000, Stephane Drouard wrote:
IMO, this is bad programming. If an object wants to access another object (global or not), it has to own a reference on it
You are getting into coding style now.
It is coding style, you are right. However, order of destructors cannot be worse that "in random order", can them ? If we implement the same sort of destruction algorithm for globals as for locals, people like Stephane (no circlar dependencies, no use of a global without a reference) will be happy, others will see no difference from the actual "random order". This solution is not perfect. It may be not possible to find a perfect way to deals with globals, be we may have a "non-perfect-but-better" way. Actual behavior for globals is (as I understand) random order destruction. Anything we do to find an order (even if not perfect in all case/style) can only be better IMHO. -- Eric Daspet

« previous php.internals (#7688) next »