On Tue, Feb 15, 2011 at 2:00 PM, David Harkness
<davi...@highgearmedia.com> wrote:
> I use K&R. I started with it just as shown but as monitors increased in size
> I stopped cuddling the else so it's now on its own line, aligning the if,
> elseif, and else nicely. One of the developers at my company uses the
> truly abominable Horstmann style which makes moving code around a serious

K&R here, unless existing guidelines are in place... CodeIgniter
framework and ExpressionEngine wants folks to use Allman.

I use a programming lang called Objectscript at work, and it will give
an error if there is not space between the "if" and the first "("...
For example:

if(...) <-- errors out.

I have had to learn to put a space in there:

if (...)

So I don't forget, I do this for everything now... I actually kinda
like the breathing room now.

Speaking of spaces, I am not a fan of putting spaces around the argument:

if ( foo == baz ) {

I definitely prefer this:

if (foo == baz) {

More on spaces: I am so glad that most PHP folks I know use tabs for
indentation and not spaces! Oops, did I just go there? Oh no I didn't!

Good thread! Thanks for that link Tedd!

Cheers,
Micky

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

Reply via email to