Re: Re: Why isn't base class constructors or destructors required to be called? (was: Re: [PHP-DEV] Return type hints)
| From: | Marian Kostadinov | Date: | Fri, 15 Sep 2006 08:00:21 +0000 |
| Subject: | Re: Re: Why isn't base class constructors or destructors required to be called? (was: Re: [PHP-DEV] Return type hints) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25717@lists.php.net to get a copy of this message | ||
Well, PHP is a loosely typed language. You have much more freedom when you
write a code. Constructors are not an exception. It is very convinient that
you may not call the parent constructor and many people do it, believe me!
And also the flag for the internal classes that has been discussed is maybe
enough for PHP.
2006/9/15, Terje Slettebø <tslettebo@broadpark.no>:
From: "Marcus Boerger" <helly@php.net> PHP is not C++ and speaking of constructors and destrcutors PHP goes morethe Delphi way. I'd also like to know _why_ constructors/destructors are less fit for PHP, than these other languages? How can you be sure that objects of a class are properly initialised, and that they clean up after themselves? (Yes, I know the runtime cleans up after them, at script termination, if want to be sloppy, but that still doesn't cover the constructor case) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php