Stephane Drouard wrote:
Implementing a common base class with empty methods (or Chris' proposal, just do not
report error) does not impact performance (just don't call them), but allows people
having a different view on programming to do it.

Here's a little patch which changes "Can not call constructor" from E_ERROR to E_NOTICE and continues execution:
http://cschneid.com/php/php5/undefined_constructor_call.patch


Feel free to point out problems with this patch and I'll spend more time on it.

I think it is a very bad idea to release PHP 5 like this. Look at the mess caused by the pre-PHP 4 feature freeze back then, especially the copy-on-assign decision which was a lot more painful to fix in PHP 5 than if it would have been done right in PHP 4. We should _not_ repeat this mistake. There's already enough problems with PHP 5 (e.g. no clean transition for __clone() from PHP 4 to PHP 5 due to the PHP 4.3 feature freeze), let's clean up as much as possible.

It will make life for millions of PHP users so much easier if they can rely on some basic facts like parent::__constructor() and not having to write their own base class just to add an empty constructor.

I believe a language should make life for programmers easy, not hard. PHP is almost there.

- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to