in reply to Re: I hate nested loops
in thread I hate nested loops
I was kind of hesitant to post this as it might motivate people jump to computational efficiency as a means of driving coding decisions,
Once you put the code into a subroutine, all you need to do is give it a good name, say init2Dhash() or whatever makes sense in the context of the code, and what idiom is used inside the sub becomes irrelevant.
At that point, you might as well go for the most efficient solution.
|
---|