Re: Howdy (new in here)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Feb 15, 2011, at 4:17 PM, Donovan Brooke wrote:

[snip]
This is what I show my students:

http://rebel.lcc.edu/sperlt/citw229/brace-styles.php

Cheers,

tedd


I didn't know there were names for bracing styles... but

Neither did I -- just the K&R style was the only name I recognized. (I still have a first edition!)

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....


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux