On Tue, May 12, 2015 at 5:01 PM, Walt Haas <[email protected]> wrote:
> On 05/12/2015 01:51 PM, Steve Meyers wrote: > > On 05/12/2015 01:13 PM, Tom Anderson wrote: > >> Because > >> > https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#24-indenting > >> says so. > > > > PSR-2 is a few people's attempt to mandate a style guide for all PHP > > developers. It is not doctrine. In fact, the use of spaces may very well > > be the abomination of desolation spoken of in the Bible. > > PSR-2 is doctrine for Drupal 8 and many other projects. The reason that > style guides are made doctrine for many projects is that they make the > code produced by multiple independent developers easier to read. And we > do spend more time reading code than writing it. > > What you're saying is that because a popular project has adapted style guide X, that it should be viewed as less than arbitrary. This is not the case. PSR-2 is chosen by people. So are other style guides. If you're working with others, agree on a style that works for all of you, not what's popular in whatever project other people are doing. While I agree that many programmers spend a lot more time reading code, that's hardly relevant to what style to choose. Like any writing, know your audience, write for them. If that's just you, great, write however you want to read. If your audience demands an APA style guide, you use it. If you're the audience of E.E. Cummings, you don't. Saying one is more readable is something nobody here has yet to do, but let's not cross that particular line. -Tod hansmann _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
