http://qs1969.pair.com?node_id=580104


in reply to Re^5: If I was forced to program in another language, the Perl language feature I would miss most would be:
in thread If I was forced to program in another language, the Perl language feature I would miss most would be:

I prefer this, as I thought I'd already stated. :-)

my($foo) = blah($yadda); unless( $foo ) { $foo = barf->new(); } unless( $foo ) { $foo = gazonkly(); } if ( $foo < $boo ) { return ERROR_CODE; }

When reading this code, if I determine that $foo was set to a non-zero value greater than $boo by function blah(), I only need to read the first half of each of the subsequent lines to know they don't impact the scenario I'm considering.

When they're written backwards to the underlying logic, I can't do that. I have to read all of each line, and then forget what I've read if it doesn't apply. That's why I don't consider the idiom any clearer when written backwards. I have to wonder: why did you think reversing tradition was a good idea in this (specific) case?