in reply to Re^5: keys and values order on a hash
in thread keys and values order on a hash
Indeed, the semantics of 'each' are clearly defined and obvious. The results of those semantics in a large body of code is not. It's essentially an action-at-a-distance effect. Understanding how that became a problem (in the event it does), and how to find what did it, can make for a very difficult bug to track down.
This is essentially the same reason global variables are generally avoided. If you can always avoid the problems with 'each', and do so when others are looking at and maintaining your code, please, let us all know how you accomplish it; it would go a long way to redeeming 'each' in my opinion, at least.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: keys and values order on a hash
by BrowserUk (Patriarch) on Jul 11, 2011 at 20:11 UTC |