in reply to Re: Re^3: The Cost of Nested Referencing
in thread The Cost of Nested Referencing
Why? What's more readable about
than do_something($_) foreach @bar; ? All I see is twice as much to type and read with absolutely no difference to the clarity. Especially when you nest a few of those and it ends up something likeforeach my $foo (@bar) { do_something($foo); }
It's atrocious. Please use a few last if ... and spare me the effort of having to eyeparse 15 levels of indentation.for $blah (@blah) { # ... # ... # ... if($whatever) { last; } while($foo) { if(@bar) { # ... while($baz) { # ... # ... # ... } if($whatever) { next; } elsif($snafu) { last; } else { # ... } # ... # ... } # ... } } # ... # ... }
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^5: The Cost of Nested Referencing
by lestrrat (Deacon) on Nov 20, 2002 at 18:39 UTC | |
by Aristotle (Chancellor) on Nov 20, 2002 at 18:43 UTC | |
by lestrrat (Deacon) on Nov 20, 2002 at 18:49 UTC |
In Section
Meditations