Re: on the coding standards - Re: [PEAR-DEV] PEAR Group June 24 2007 Meeting Minutes
| From: | Joshua Eichorn | Date: | Mon, 09 Jul 2007 17:50:37 +0000 |
| Subject: | Re: on the coding standards - Re: [PEAR-DEV] PEAR Group June 24 2007 Meeting Minutes | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47294@lists.php.net to get a copy of this message | ||
Alexey Borzov wrote:
Hi, Arnaud Limbourg wrote:I'd really like to see something like "developer X, who maintains opcode cache Y, suggests this approach in his (tutorial|presentation|article) which can be read at [Z]." here, not just vigorous handwaving. There is a thread from oct 2006 where we got feedback from Ramsus, http://thread.gmane.org/gmane.comp.php.pear.core/4803"*_once including of files not allowed" - Requires autoload() mechanisms, which are not considered by all to be the best mechanism for loading files and documenting code.. - This is a significant change and would need serious backing by all members.. I think a long time ago someone proposed class_exists(.....) ? false : require_once '......'; This seems a better compromise - as it solves 2 problem with one shot. - although an import statement would be better......The issue trying to be solved here is to be opcoce cache friendly.
It is also obvious the allfiles.php approach is extremely un-friendly to those not using the opcode cache. If you are targeting PHP6 (which will supposedly have a built-in opcode cache) why are you not targeting its other features (say, namespaces)? there is no guarantee any namespaces will get into php6 (last time i looked the patch hadn't been accepted), and we would like to ship some pear2 code before php6 comes out since no one knows when that will be.
Also I see reliance on __autoload(), but if I understand correctly, we aren't going to provide an __autoload() implementation, so that people will have to write this themselves. I'd bet that their __autoload()'s will contain require_once calls and other *interesting* things.We will be providing an autoload class that you can use if you want. Also remember that part of the point of PEAR2 is too push the state of PHP development forward, we don't want to have to make pear3 as soon as php6 comes out so we need to embrace things like opcache friendliness. -josh