[wp-hackers] Coding style
Doug Stewart
dstewart at atl.lmco.com
Wed Jul 5 14:42:56 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ryan Boren wrote:
>> 5. If at all possible, omit curly braces.
>
> For my personal code, I prefer to keep the curly braces. But, most WP
> code omits them so we might as well make it official. Also, in
> templates we tend to use the colon/endif style, especially when we're
> jumping in and out of <?php tags a lot.
>
Personally, I HATE the if...endif/while...do/etc. structures. None of
the text editors/IDEs that I've used gracefully match those structures.
They'll happily show/highlight matching ()'s and {}'s, but the long
forms confuse the heck out of 'em and make me have to manually hunt down
matching pairs. I like for the IDEs to do the heavy lifting so that I
don't have to.
YMMV, of course.
- --
- ----------
Doug Stewart
Senior Systems Administrator/Web Applications Developer
Lockheed Martin Advanced Technology Labs
dstewart at atl.lmco.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEq8/wN50Q8DVvcvkRAixCAJ9/klriYTPbSt5IKOHhV5oLlcQOigCfUrP3
LdEsQ9etXSm4Ei1WI2//8qI=
=F84t
-----END PGP SIGNATURE-----
More information about the wp-hackers
mailing list