On Sep 30, 2006, at 11:55 AM, Jeff Moore wrote:
Seriously, the important thing is to have a standard, not so much
what the standard is. (Unless it is really bad.) These standards
discussions always generate heat and friction and not much light.
I generally like the PEAR standard. Is there a reason not to use
it? Why not start with that and say, we conform to the PEAR
standard, except for these exceptions, and here are some
additions. Or if you just can't bring yourself to link to the PEAR
standard, at least re-state it and adopt compatibility as a goal.
There is so little to be gained from creating yet another coding
standard.
Preach the word, brother. Jeff and I have blogged on exactly these
issues in the past ...
* <http://paul-m-jones.com/blog/?p=34>
* <http://www.procata.com/blog/archives/2004/09/24/php-coding-
standards/>
To sum up, I'll quote Jeff:
Having your code in a "normalized" form frees the mind to consider
other aspects of the code. Poorly or inconsistently styled code can
obscure refactorings. With a good coding standard, the benefits
outweigh having to re-train yourself out of a few habits.
The general thesis is to adopt a previously-existing published
standard (in this case, PEAR) and adhere to it, noting any deviations
as exceptions. See also the Solar coding style guide, which is
composed only of a link to the PEAR style guide and one exception note.
<http://solarphp.com/index.php/docs/read/Main/StyleGuide>
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>