On 04/15/06 07:59 Luigi Rizzo said the following:
On Fri, Apr 14, 2006 at 04:28:23PM -0700, Brian Degenhardt wrote:
why removing curly braces on one-line if statements is worth the trouble

on this there are different schools of thoughts, but my take in
general is that it makes the code a lot more compact and readable,

at the risk of sacrificing readability, using curly braces even on single line if or else statements reduces errors later on when the one line expands to a two (or more) line. i've been bitten by this enough to automatically use braces even if it's a one line if/else or for.

--
Regards,                           /\_/\   "All dogs go to heaven."
[EMAIL PROTECTED]                (0 0)    http://www.alphaque.com/
+==========================----oOO--(_)--OOo----==========================+
| for a in past present future; do                                        |
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done                                                              |
+=========================================================================+
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to