in reply to Re: next unless condition
in thread next unless condition
I was with you all the way until $cell or next;. That is a clever trick which doesn't convey intent and thus impedes understanding and maintenance.
From an understanding and maintenance point of view:
next if !$cell;
is succinct and clear and thus maintainable. In general I find if with a negated expression clearer than unless, especially if the expression is non-trivial. It also scales better so there are fewer surprises during maintenance if the expression needs to change.
Update: s/cleaver/clever/. Thanks kennethk - I'd like to claim the pun, but it wasn't.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: next unless condition
by haukex (Archbishop) on Apr 01, 2016 at 07:38 UTC | |
|
Re^3: next unless condition
by Anonymous Monk on Mar 31, 2016 at 21:35 UTC | |
by GrandFather (Saint) on Apr 01, 2016 at 06:03 UTC | |
by dsheroh (Monsignor) on Apr 01, 2016 at 07:43 UTC | |
by RonW (Parson) on Apr 04, 2016 at 19:52 UTC | |
by afoken (Chancellor) on Apr 04, 2016 at 20:49 UTC | |
by dsheroh (Monsignor) on Apr 05, 2016 at 08:37 UTC | |
| |
by Anonymous Monk on Apr 04, 2016 at 20:20 UTC | |
by Anonymous Monk on Apr 01, 2016 at 08:34 UTC |