Re: Re: Final solution to destructor visibility?
| From: | (Marcus B�rger) | Date: | Fri, 04 Jul 2003 17:29:03 +0000 |
| Subject: | Re: Re: Final solution to destructor visibility? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3245@lists.php.net to get a copy of this message | ||
Hello Andi,
Friday, July 4, 2003, 10:52:45 AM, you wrote:
AG> At 12:55 AM 4/7/2003 +0200, Marcus Börger wrote:
>>Hello Andi,
>>
>>Friday, July 4, 2003, 1:35:58 AM, you wrote:
>>
>>AG> Maybe we should just not allow access modifiers for the destructor. It
>>AG> doesn't make very much sense and we don't "promise" destruction
>>AG> at a
>>AG> specific point in time.
>>
>>On one hand it would of course be an option which simplifies our source (a few
>>lines less code). But on the other hand it would disallow some nice oo tricks.
>>And as the solution shows we could have at least one good working solution.
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.
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