Re: Coding Standards Document
| From: | Roman Neuhauser | Date: | Tue, 21 Nov 2006 10:34:56 +0000 |
| Subject: | Re: Coding Standards Document | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244943@lists.php.net to get a copy of this message | ||
# kevin@oceania.net / 2006-11-21 06:07:45 +1100:
> This one time, at band camp, "Eric Butera" <digital.tarsier@gmail.com> wrote:
>
> > You might check out the Zend Framework coding standards.
> > http://framework.zend.com/manual/en/coding-standard.html
> Zend Framework coding standards fails for me here...
> "Use an indent of 4 spaces, with no tabs."
>
> The use of tabs is dynamic, where as with the static tabs you can easily
> set you editor to handle them any way you wish, assuming you have a
> decent editor such as vi(m).
> :set ts=4
The text editor typically isn't the only client that needs to display
the source code. Various web-based tools such as ViewVC depend on the
way their clients interpret the HTML and/or CSS, patches in emails are
displayed by different MUAs, there's print...
With spaces, the sole configuration one needs to assume from the
client(s) is proper display of a monospaced font, and that's much more
reliable than praying for a uniform tab display. Twice so if you choose
to use ts=4 because most software (at least out of the set I use) places
tabstops at 8-char intervals.
> The real key to successful "standards" is consistency, regardless of what
> method you choose.
That seems inconsistent with your tab/space-based dismissal of the ZF CS.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991