Re: [PEPr] Comment on RFC::NotificationCenter
| From: | Lukas Smith | Date: | Tue, 04 Jan 2005 17:43:45 +0000 |
| Subject: | Re: [PEPr] Comment on RFC::NotificationCenter | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35333@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Bertrand Mansion wrote:To answer my own question: yes interfaces work with __autoload(), however I doubt that we will ever get such a "funky" optimization ini option that would disable interface checking. Btw: interfaces serve to goal for me: 1) development aid 2) meta data for dynamic code However only 1) requires that the interface is actually defined and checked .. and that is why such an ini option could be useful, but its such an ugly thing to do so it will never happen. So yes Bertrand you have a point. If we actually use interfaces inside the code (compared to simply requiring that the developer follows the interface without actually typing "implements foobar") we have the file I/O either way. However this just makes be ponder the feasibility of such design patterns in PHP even more. But maybe I just need to pay Zend for their performance suite (dunno how intelligently the performance suite is in reducing actual file I/O though). regards, LukasYeah .. do interfaces work via __autoload? would be kind of funky to be able to disable interface checking via an ini option. I mean in production you could care less about what implement what interface .. its more of a development tool :-)That is why I proposed the alternative of simply having a common interface with a reference implementation (or maybe several for different specific needs) that people essentially cut and paste. I am not so worried about lines of code here. I am more worried about number of required files.I think the notification center is a lot less intrusive than PEAR, PEAR_Error or even Error_Stack. It is not because you use it that the user has to use it. Furthermore, requiring an interface file per observable packages would take even more time... :D