Re: Re: Final solution to destructor visibility?

From: Date: Fri, 04 Jul 2003 20:16:11 +0000
Subject: Re: Re: Final solution to destructor visibility?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-3246@lists.php.net to get a copy of this message
At 07:29 PM 4/7/2003 +0200, Marcus Börger wrote:
AG> I don't like these OO tricks. It makes sense in my opinion not to have AG> access modifiers for destructors. The destructor should be called on object AG> destruction no matter what. Hm, i think full language support for factories and related patterns are oo tricks that we should provide. At least i *very* much hope we do.
I don't see any correlation between factories and design patterns and allowing destructors to have access modifiers. Java doesn't even have destructors :) Anyway, as I mentioned before, destructors shouldn't have access modifiers (like methods in interfaces). So what you are saying is that today we can make destructors private/protected? If so we need to fix it. Andi
Sometimes it is necessary to explicitly destruct an object and bla bla.... Btw. have a look at tests/classes/destructor_and_globals.phpt and make the destuctor protected or private with and without my patch. Beides that the situation is somekind of a more 'funny' problem we should fix it sometime. -- Best regards,
 Marcus                            mailto:helly@php.net


« previous php.internals (#3246) next »