Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^6: Is it safe to append to the array you are iterating over

by Anonymous Monk
on Mar 15, 2013 at 14:15 UTC ( #1023705=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Is it safe to append to the array you are iterating over
in thread Is it safe to append to the array you are iterating over

The simplest and most straightforward way is to append to the array and let it run until it is done. However unlikely it is to be broken, there is no guarantee that will continue to work.

A safer solution was chosen instead. A fairly small reduction in simplicity for the warm fuzzies of safety.

Which one is "better" is at this point matter of opinion. In one sense the final choice was deemed best because it was the final choice. In another sense, the original was best (aside from being disqualified on a technicality). In the same sense that a runner can be fastest but not win.


Comment on Re^6: Is it safe to append to the array you are iterating over

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023705]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2014-09-21 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls