I have that preference as well. (I also like to think that anyone
contributing
to the framework would know enough about PHP syntax to not get
stuck on braces
which have been omitted! :-S )
Well... I wouldn't say I get stuck on it. It's more of an overall
approach:-
"Use braces on the next line for classes and functions except for
loops and conditionals, which are separated only with 1 character
whitespace and except for loops and conditionals that only span 1
line - omit the braces in this instance"
"Use braces on the next line
- Except for loops and conditionals, which are separated only with 1
character whitespace
- Except for loops and conditionals that only span 1 line - omit the
braces in this instance"
Both of those blocks of words work as communication but one's easier
to read and to tell when clauses have been added/modified.
We're not just coding for efficiency, we're coding for others to
easily review and digest code and any way possible to enforce some
consistency is a _good_ thing IMO.
When you start adding unnecessary shortcuts (what do you really gain
by losing the brackets?) you add another (albeit small) layer of
complexity and more barriers to understanding. Even if beginners
aren't contributing to the framework, they may be curious as to the
workings and we should encourage users of all skill levels to be
reviewing the code.
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com