[PEPr] Comment on RFC::Coding standard enhancements
| From: | Travis Swicegood | Date: | Tue, 11 Mar 2008 15:19:21 +0000 |
| Subject: | [PEPr] Comment on RFC::Coding standard enhancements | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49370@lists.php.net to get a copy of this message | ||
Travis Swicegood (http://pear.php.net/user/tswicegood) has commented on the proposal for RFC::Coding
standard enhancements.
Comment:
Sorry for coming to the party late, but I thought I would throw my two
cents worth in. I have gone through periods where I have aligned function
parameters and arrays for readability. I do like the output. Without
fail, however, I end up having to modify 5 lines of code because I added
one new key/value pair to an array where the key was 2 characters longer
than the other keys. This messes up diffs and makes changes appear heavier
than they are.
Every time I have tried using alignment either in assigning values,
arrays, or function calls, I end up reverting back to my old ways out of
frustration. Maybe I just rewrite my code too often for it to be useful,
but I would personally pull all references to alignment as they can get in
the way and serve next to no valid purpose. In this instance, I'm balking
at "readability" being a valid purpose as any decent IDE will give you much
more usable UI into the code than any amount of formatting can.
I do like the formalized indenting rules, however. I use those on a daily
basis already, so having them becoming "official" would be nice.
Another nice addition would be multi-line formatting and indenting of
arrays (from my perspective without alignment, obviously). Having a
trailing commas with the closing parenthesis would be nice as well as it
helps keep the diff minimal.
$some_array = array(
'foo',
'bar',
);
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=538
--
Sent by PEPr, the automatic proposal system at http://pear.php.net