Re: Howdy (new in here)
| From: | Tamara Temple | Date: | Wed, 16 Feb 2011 04:46:10 +0000 |
| Subject: | Re: Howdy (new in here) | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311357@lists.php.net to get a copy of this message | ||
On Feb 15, 2011, at 4:17 PM, Donovan Brooke wrote:
[snip]Neither did I -- just the K&R style was the only name I recognized. (I still have a first edition!)This is what I show my students: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php Cheers, teddI didn't know there were names for bracing styles... but
However, I think on my next project, I will use "Whitesmith's Style".I would be more inclined to try other styles if my editor of choice, TextMate, were to easily support them; as it is now, TextMate automatically un-indents the line when you type a closing } on an open line, and automatically indents on an open line after a opening { -- so, what to do? I don't really want to dive into programming my editor's functions (which I could do with TextMate) as that is really getting into non-productive tweaking.
The issue I had at times with the K&R style was locating the the matching (open or closed) brace.. as they were not on the same character column.I never really found this to be a problem as long as I kept the various branches short enough. I was unlucky enough to find someone who coded a function that went on for 30 pages one (this was in C, not PHP) and *that* was hard to untangle. Of course, one of the first things I did when I had a spare moment was to chop it up in to individual functions....