At 5/2/2001 12:46 PM, Anuradha Ratnaweera wrote:
>Most of your guidelines match with our practices. Here are some comments.
Thanks for the comments.
> > 1.4 Whitespaces
> >
> > - No whitespace after function or method name. Example:
> >
> > exit()
>
>We also use this. But I have seen others using spaces. Even there are some
>examples in php-manual with spaces (e.g. array_shift).
Actually I took most of the points in the 'Whitespaces' section from
Guido's Python Style Guide. Most of the points are not really a big
deal, but I usually suggest at least making a distinction between ()
for functions and () for statements.
for (;;)
if (..)
exit();
die();
> > 1.6 Quotes
> >
> > Use whichever ones you like. But if you can use '' for simple strings,
> > and "" only if you need interpolation.
>
>This should _very_slightly_ improve performance too.
Yup, though I have never thought of benchmarking this :)
> > 4. File organization
>
>We use WML (website meta language - www.engelschall.com/sw/wml/) with make
>to produce single php files and do _not_ use the include feature of php.
>
>Also, we have written scripts that creates diff files between releases.
Interesting. How do you find WML so far? I evaluated WML once in
the past, but it seemed too complex to me then...
> > 6. Creating documentation
>
>We use tex, and we are planning to go for texinfo.
Do you also embed these in the PHP scripts? I prefer this way
(like Perl's POD, Java's Javadoc, Python's docstrings), because
it is much easier to synchronize with the code. Also, since I
often write the documentation first and then write some code,
I prefer putting them together.
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]