Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C++ Novice Question: Why are for loops bad? (as mentioned in the article). What's the alternative?


You 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!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: