in reply to Re: (jeffa) 2Re: (Ovid - Why I love nested If-Else blocks)
in thread Why I Hate Nested If-Else blocks
I might do something like this:Don't align things vertically for the sake of aligning them, align them so that they're readable! The fragment above borders on obfuscation. There's a mind-numbing repetitive pattern on the right, and thismy $func = ($foo > 7) ? $bar && \&bar_mysub || $baz && \&baz_mysub : $bar && \&bar_other_mysub || $baz && \&baz_other_mysub; $func->($foo) if $func;
thing on the left. Yuch. I had to stop and really look at that fragment to get past the visual clutter.|| : ||
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) 5Re: (Ovid - Why I love nested If-Else blocks)
by jeffa (Bishop) on Jan 04, 2002 at 04:30 UTC |
In Section
Meditations