in reply to Re: Breaking out of an 'if'
in thread Breaking out of an 'if'

I find the extra braces to be too subtle when rereading the code
Whitespace is your friend:
if ($some_condition){ { #heck, even comment the bare block &some_stuff(); last if $another_condition; &some_more_stuff; } }

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

Replies are listed 'Best First'.
Re^3: Breaking out of an 'if'
by bluto (Curate) on Apr 15, 2005 at 15:33 UTC
    Whitespace is your friend:

    That helps some, but to me it still looks like a cut/paste error without a comment. If you have to comment, I'm not sure what the point is (i.e. use something like one of the other solutions which is more self-describing), but of course YMMV. Now if you use this all of the time in the code you maintain then that's probably fine since it becomes an idiom (i.e. a programmer will see this code multiple times and realize it isn't a typo). I find that I rarely if ever do this so it would become more of a hazard than anything else to me...