Hi!

Many PHP features should be language constructs, but they were made as
language hacks.

__construct is evil, as like any other language hack

Constructors are standard feature in many languages. There's nothing evil in them.

class Client {
     function __construct() {
         // some code
         parent::__construct(); // as good client call the super class
         // and then more code
     }
}

Arguably, initialization is the part of the API, but I see your point - it might be useful to supply all objects with empty default ctor so that parent::__construct() always works. Submit a feature request to bugs.php.net.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to