in reply to Re: bloated 'if' formatting
in thread bloated 'if' formatting
Not to start a format war, but I've never understood the tabs == bad camp. There are times when using tabs is foolish (mostly, intra-line aligntment), for example:
$opt_a = 1; # this is option a $obt_hoo = 1; # this is option b
All the whitespace there should be spaces, not tabs.
On the other hand, I love it when code I maintain uses tabs for leftmost indentation. This is because I know many people who like an 8-space indent, where as I (for example), much prefer a 4-space indent. I have colleagues that also like a 2-space indent (!). By using tabs for left-side indents, we can all have our way by simply configuring our editor.
What's the argument against doing this?
In the case at hand, I would do:
if ( condition 1 && condition 2 && condition 3 ... ) { code to be executed } #/ short desc of if code, if needed. else { else-block code } #/ short desc of else code, if needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: bloated 'if' formatting
by Nkuvu (Priest) on Oct 06, 2005 at 19:02 UTC | |
|
Re^3: bloated 'if' formatting
by Perl Mouse (Chaplain) on Oct 07, 2005 at 08:30 UTC | |
by BrowserUk (Patriarch) on Oct 07, 2005 at 10:52 UTC |