14 ms·
C++ Novice Question: Why are for loops bad? (as mentioned in the article). What's the alternative?
by xerophtye 13y ago
C++ Novice Question: Why are for loops bad? (as mentioned in the article). What's the alternative?
- BartoszMilewski 13y agoYou should use standard algorithms whenever possible. Sean Parent talked about it at Going Native. He was able to transform a horrible set of for loops he found in Google's code into a few lines of modern C++ using standard algorithms. But he _is_ Sean Parent!