On Mon, Sep 25, 2006 at 11:22:46PM -0400, John Macdonald wrote:
> On Mon, Sep 25, 2006 at 12:35:49PM +0100, David Cantrell wrote:
> > On Thu, Sep 21, 2006 at 07:02:56PM -0400, Duane Bronson top-posted:
> > > Ronald J Kimball wrote:
> > > > What would you have Perl do in the case of nested loops?
> > > $.. should be the iterator count in the parent loop, $... should be the 
> > > iterator count in the grandparent loop, ...
> > Ick!  Better to use a stack, methinks, like I do for getting at outer
> > map{}s' versions of $_ in NestedMap.
> And even using a stack suffers from the flaw that any sort
> of refactoring that puts a loop around a portion of the code
> means search through the entire section and increasing the
> index of any reference to a loop outside the new one ...

Any refactoring should be done carefully and with understanding of what
the code you're refactoring is doing.  I'm not sure what your point is.

And the bugs you introduce while doing it will, of course, be caught by
your regression tests.

-- 
David Cantrell | A machine for turning tea into grumpiness

  Irregular English:
    you have anecdotes; they have data; I have proof
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to